| @@ -1,111 +1,123 @@ | | | @@ -1,111 +1,123 @@ |
1 | # $NetBSD: Makefile.common,v 1.31 2019/10/08 12:40:54 hauke Exp $ | | 1 | # $NetBSD: Makefile.common,v 1.32 2019/10/11 12:36:44 hauke Exp $ |
2 | # | | 2 | # |
3 | # used by editors/xemacs-nox11/Makefile | | 3 | # used by editors/xemacs-nox11/Makefile |
4 | # used by editors/xemacs/Makefile | | 4 | # used by editors/xemacs/Makefile |
5 | | | 5 | |
6 | DISTNAME= xemacs-21.4.24 | | 6 | DISTNAME= xemacs-21.4.24 |
7 | CATEGORIES= editors | | 7 | CATEGORIES= editors |
8 | MASTER_SITES= ${MASTER_SITE_XEMACS:=${DISTNAME:C/[.][^.]*$//}/} | | 8 | MASTER_SITES= ${MASTER_SITE_XEMACS:=${DISTNAME:C/[.][^.]*$//}/} |
9 | | | 9 | |
10 | MAINTAINER= hauke@NetBSD.org | | 10 | MAINTAINER= hauke@NetBSD.org |
11 | HOMEPAGE= http://www.xemacs.org/ | | 11 | HOMEPAGE= http://www.xemacs.org/ |
12 | LICENSE= gnu-gpl-v2 | | 12 | LICENSE= gnu-gpl-v2 |
13 | | | 13 | |
14 | .include "../../mk/bsd.prefs.mk" | | 14 | .include "../../mk/bsd.prefs.mk" |
15 | | | 15 | |
16 | FILESDIR= ${.CURDIR}/../../editors/xemacs/files | | 16 | FILESDIR= ${.CURDIR}/../../editors/xemacs/files |
17 | PATCHDIR= ${.CURDIR}/../../editors/xemacs/patches | | 17 | PATCHDIR= ${.CURDIR}/../../editors/xemacs/patches |
18 | DISTINFO_FILE= ${.CURDIR}/../../editors/xemacs/distinfo | | 18 | DISTINFO_FILE= ${.CURDIR}/../../editors/xemacs/distinfo |
19 | PLIST_SRC= ${.CURDIR}/../../editors/xemacs/PLIST | | 19 | PLIST_SRC= ${.CURDIR}/../../editors/xemacs/PLIST |
20 | | | 20 | |
21 | USE_TOOLS+= makeinfo perl | | 21 | USE_TOOLS+= patch makeinfo perl |
22 | | | 22 | |
23 | HAS_CONFIGURE= yes | | 23 | HAS_CONFIGURE= yes |
24 | | | 24 | |
25 | DIST_SUBDIR= xemacs | | 25 | DIST_SUBDIR= xemacs |
26 | PLIST_SUBST+= DISTNAME=${DISTNAME} | | 26 | PLIST_SUBST+= DISTNAME=${DISTNAME} |
27 | FILES_SUBST+= DISTNAME=${DISTNAME} | | 27 | FILES_SUBST+= DISTNAME=${DISTNAME} |
28 | MESSAGE_SUBST+= DISTNAME=${DISTNAME} | | 28 | MESSAGE_SUBST+= DISTNAME=${DISTNAME} |
29 | INFO_FILES= yes | | 29 | INFO_FILES= yes |
30 | | | 30 | |
| | | 31 | # NetBSD ships with makeinfo v4 in base, and v6 format is not compatible |
| | | 32 | MAKEINFO_4_PATCHES= patch-man_lispref_debugging.texi \ |
| | | 33 | patch-man_xemacs_custom.texi \ |
| | | 34 | patch-man_lispref_intro.texi |
| | | 35 | |
31 | .if defined(MANZ) | | 36 | .if defined(MANZ) |
32 | PLIST_SUBST+= ELSUFX='.gz' | | 37 | PLIST_SUBST+= ELSUFX='.gz' |
33 | .else | | 38 | .else |
34 | PLIST_SUBST+= ELSUFX='' | | 39 | PLIST_SUBST+= ELSUFX='' |
35 | .endif | | 40 | .endif |
36 | | | 41 | |
37 | CONFIGURE_ARGS+= ${MACHINE_GNU_PLATFORM} | | 42 | CONFIGURE_ARGS+= ${MACHINE_GNU_PLATFORM} |
38 | CONFIGURE_ARGS+= --prefix=${PREFIX} | | 43 | CONFIGURE_ARGS+= --prefix=${PREFIX} |
39 | CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}/man1 | | 44 | CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}/man1 |
40 | CONFIGURE_ARGS+= --infopath=${PREFIX}/${PKGINFODIR} | | 45 | CONFIGURE_ARGS+= --infopath=${PREFIX}/${PKGINFODIR} |
41 | CONFIGURE_ARGS+= --with-clash-detection | | 46 | CONFIGURE_ARGS+= --with-clash-detection |
42 | CONFIGURE_ARGS+= --with-mule=yes | | 47 | CONFIGURE_ARGS+= --with-mule=yes |
43 | CONFIGURE_ARGS+= --with-msw=no | | 48 | CONFIGURE_ARGS+= --with-msw=no |
44 | CONFIGURE_ARGS+= --with-postgresql=no | | 49 | CONFIGURE_ARGS+= --with-postgresql=no |
45 | CONFIGURE_ARGS+= --pdump | | 50 | CONFIGURE_ARGS+= --pdump |
46 | CONFIGURE_ARGS+= --with-system-malloc | | 51 | CONFIGURE_ARGS+= --with-system-malloc |
47 | CFLAGS+= -Dunix | | 52 | CFLAGS+= -Dunix |
48 | | | 53 | |
49 | # Use terminfo on NetBSD-6 and newer. | | 54 | # Use terminfo on NetBSD-6 and newer. |
50 | # We cannot use terminfo.*.mk as XEmacs enforces a link to termcap, | | 55 | # We cannot use terminfo.*.mk as XEmacs enforces a link to termcap, |
51 | # but this is fine for us. | | 56 | # but this is fine for us. |
52 | .if (${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD") && exists(/usr/include/term.h) | | 57 | .if (${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD") && exists(/usr/include/term.h) |
53 | CPPFLAGS+= -DTERMINFO | | 58 | CPPFLAGS+= -DTERMINFO |
54 | .endif | | 59 | .endif |
55 | | | 60 | |
56 | .if ${OPSYS} == "SunOS" | | 61 | .if ${OPSYS} == "SunOS" |
57 | . if !exists(/usr/demo/SOUND/libaudio.a) && \ | | 62 | . if !exists(/usr/demo/SOUND/libaudio.a) && \ |
58 | !exists(/usr/demo/SOUND/lib/libaudio.a) | | 63 | !exists(/usr/demo/SOUND/lib/libaudio.a) |
59 | CONFIGURE_ARGS+= --with_sound=none | | 64 | CONFIGURE_ARGS+= --with_sound=none |
60 | . endif | | 65 | . endif |
61 | .endif | | 66 | .endif |
62 | | | 67 | |
63 | .if (${OPSYS} == "DragonFly") && exists(/usr/lib/crtn.o) | | 68 | .if (${OPSYS} == "DragonFly") && exists(/usr/lib/crtn.o) |
64 | CPPFLAGS+= -DDFLY_CRT_USRLIB | | 69 | CPPFLAGS+= -DDFLY_CRT_USRLIB |
65 | .endif | | 70 | .endif |
66 | | | 71 | |
67 | CHECK_WRKREF_SKIP= bin/xemacs* | | 72 | CHECK_WRKREF_SKIP= bin/xemacs* |
68 | REPLACE_SH= etc/check_cygwin_setup.sh | | 73 | REPLACE_SH= etc/check_cygwin_setup.sh |
69 | | | 74 | |
70 | LIBDIR= ${PREFIX}/lib/${DISTNAME} | | 75 | LIBDIR= ${PREFIX}/lib/${DISTNAME} |
71 | ARCHLIBDIR= ${LIBDIR}/${MACHINE_GNU_PLATFORM} | | 76 | ARCHLIBDIR= ${LIBDIR}/${MACHINE_GNU_PLATFORM} |
72 | | | 77 | |
73 | # The portable dumper creates a dump file with a build ID in its name | | 78 | # The portable dumper creates a dump file with a build ID in its name |
74 | GENERATE_PLIST+= ${ECHO} bin/${DISTNAME}-`${WRKSRC}/src/xemacs -sd`.dmp ; | | 79 | GENERATE_PLIST+= ${ECHO} bin/${DISTNAME}-`${WRKSRC}/src/xemacs -sd`.dmp ; |
75 | | | 80 | |
76 | # This list overrides variables used in the source Makefiles at install | | 81 | # This list overrides variables used in the source Makefiles at install |
77 | # time to allow for ${DESTDIR}-style installation. This variables list | | 82 | # time to allow for ${DESTDIR}-style installation. This variables list |
78 | # is pulled from the ``mkdir'' target of Makefile.in.in. | | 83 | # is pulled from the ``mkdir'' target of Makefile.in.in. |
79 | # | | 84 | # |
80 | INSTALL_MAKE_FLAGS+= archlibdir=${DESTDIR}${ARCHLIBDIR} | | 85 | INSTALL_MAKE_FLAGS+= archlibdir=${DESTDIR}${ARCHLIBDIR} |
81 | INSTALL_MAKE_FLAGS+= bindir=${DESTDIR}${PREFIX}/bin | | 86 | INSTALL_MAKE_FLAGS+= bindir=${DESTDIR}${PREFIX}/bin |
82 | INSTALL_MAKE_FLAGS+= datadir=${DESTDIR}${PREFIX}/lib | | 87 | INSTALL_MAKE_FLAGS+= datadir=${DESTDIR}${PREFIX}/lib |
83 | INSTALL_MAKE_FLAGS+= docdir=${DESTDIR}${ARCHLIBDIR} | | 88 | INSTALL_MAKE_FLAGS+= docdir=${DESTDIR}${ARCHLIBDIR} |
84 | INSTALL_MAKE_FLAGS+= etcdir=${DESTDIR}${LIBDIR}/etc | | 89 | INSTALL_MAKE_FLAGS+= etcdir=${DESTDIR}${LIBDIR}/etc |
85 | INSTALL_MAKE_FLAGS+= exec_prefix=${DESTDIR}${PREFIX} | | 90 | INSTALL_MAKE_FLAGS+= exec_prefix=${DESTDIR}${PREFIX} |
86 | INSTALL_MAKE_FLAGS+= infodir=${DESTDIR}${LIBDIR}/info | | 91 | INSTALL_MAKE_FLAGS+= infodir=${DESTDIR}${LIBDIR}/info |
87 | INSTALL_MAKE_FLAGS+= libdir=${DESTDIR}/lib | | 92 | INSTALL_MAKE_FLAGS+= libdir=${DESTDIR}/lib |
88 | INSTALL_MAKE_FLAGS+= lispdir=${DESTDIR}${LIBDIR}/lisp | | 93 | INSTALL_MAKE_FLAGS+= lispdir=${DESTDIR}${LIBDIR}/lisp |
89 | INSTALL_MAKE_FLAGS+= mandir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 | | 94 | INSTALL_MAKE_FLAGS+= mandir=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 |
90 | INSTALL_MAKE_FLAGS+= moduledir=${DESTDIR}${ARCHLIBDIR}/modules | | 95 | INSTALL_MAKE_FLAGS+= moduledir=${DESTDIR}${ARCHLIBDIR}/modules |
91 | INSTALL_MAKE_FLAGS+= pkgdir=${DESTDIR}${LIBDIR}/lisp | | 96 | INSTALL_MAKE_FLAGS+= pkgdir=${DESTDIR}${LIBDIR}/lisp |
92 | INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX} | | 97 | INSTALL_MAKE_FLAGS+= prefix=${DESTDIR}${PREFIX} |
93 | INSTALL_MAKE_FLAGS+= sitelispdir=${DESTDIR}${PREFIX}/lib/xemacs/site-lisp | | 98 | INSTALL_MAKE_FLAGS+= sitelispdir=${DESTDIR}${PREFIX}/lib/xemacs/site-lisp |
94 | INSTALL_MAKE_FLAGS+= sitemoduledir=${DESTDIR}${PREFIX}/lib/xemacs/site-modules | | 99 | INSTALL_MAKE_FLAGS+= sitemoduledir=${DESTDIR}${PREFIX}/lib/xemacs/site-modules |
95 | | | 100 | |
96 | post-extract: | | 101 | post-extract: |
97 | cp ${FILESDIR}/dragonfly.h ${WRKSRC}/src/s/ | | 102 | cp ${FILESDIR}/dragonfly.h ${WRKSRC}/src/s/ |
98 | | | 103 | |
| | | 104 | .if (${OPSYS} == "NetBSD") |
| | | 105 | post-patch: |
| | | 106 | .for xpatch in ${MAKEINFO_4_PATCHES} |
| | | 107 | cd ${WRKSRC} && ${PATCH} ${PATCH_ARGS} < ${FILESDIR}/${xpatch} |
| | | 108 | .endfor |
| | | 109 | .endif |
| | | 110 | |
99 | pre-build: | | 111 | pre-build: |
100 | rm -f ${WRKSRC}/etc/ctags.1.orig | | 112 | rm -f ${WRKSRC}/etc/ctags.1.orig |
101 | rm -f ${WRKSRC}/lisp/gui.el.orig | | 113 | rm -f ${WRKSRC}/lisp/gui.el.orig |
102 | | | 114 | |
103 | post-install: | | 115 | post-install: |
104 | ${INSTALL_DATA} ${WRKSRC}/Installation ${DESTDIR}${LIBDIR}/etc/ | | 116 | ${INSTALL_DATA} ${WRKSRC}/Installation ${DESTDIR}${LIBDIR}/etc/ |
105 | .if defined(MANZ) | | 117 | .if defined(MANZ) |
106 | find ${DESTDIR}${LIBDIR} -name "*.el" -type f -print | xargs ${GZIP_CMD} | | 118 | find ${DESTDIR}${LIBDIR} -name "*.el" -type f -print | xargs ${GZIP_CMD} |
107 | .endif | | 119 | .endif |
108 | | | 120 | |
109 | .include "../../databases/gdbm/buildlink3.mk" | | 121 | .include "../../databases/gdbm/buildlink3.mk" |
110 | .include "../../mk/oss.buildlink3.mk" | | 122 | .include "../../mk/oss.buildlink3.mk" |
111 | .include "../../mk/termcap.buildlink3.mk" | | 123 | .include "../../mk/termcap.buildlink3.mk" |