summaryrefslogtreecommitdiff
path: root/lang/elk
diff options
context:
space:
mode:
authorjlam <jlam>2002-09-23 08:45:40 +0000
committerjlam <jlam>2002-09-23 08:45:40 +0000
commit695e517a1a6eb9fc1713d456b50b179744c5983e (patch)
tree2e5e09469e81c65d3035b2145efdc3810d89e70f /lang/elk
parentede24bb643359e0ae20d93ab01e088359057e048 (diff)
downloadpkgsrc-695e517a1a6eb9fc1713d456b50b179744c5983e.tar.gz
* buildlink1 -> buildlink2
* Replace ELK_USE_{X11,MOTIF} with ELK_GUI, which is either "none" or is some combination of "xaw" and/or "motif". * Reenable Motif -- it seems to build properly with OpenMotif-2.0.x. * Modernize this package a bit and clean up how linker flags are passed to the build process by using the new variables available.
Diffstat (limited to 'lang/elk')
-rw-r--r--lang/elk/Makefile102
-rw-r--r--lang/elk/distinfo4
-rw-r--r--lang/elk/patches/patch-ac8
3 files changed, 45 insertions, 69 deletions
diff --git a/lang/elk/Makefile b/lang/elk/Makefile
index 8675befa1a7..8f6199f716d 100644
--- a/lang/elk/Makefile
+++ b/lang/elk/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2002/01/09 23:12:23 wiz Exp $
+# $NetBSD: Makefile,v 1.20 2002/09/23 08:45:42 jlam Exp $
# FreeBSD Id: Makefile,v 1.15 1997/09/01 12:28:30 tg Exp
#
@@ -15,83 +15,59 @@ COMMENT= Embeddable Scheme interpreter
NOT_FOR_PLATFORM= *-*-alpha *-*-mips* *-*-sparc64
ALL_TARGET= default
-USE_BUILDLINK_ONLY= yes
+USE_BUILDLINK2= yes
.include "../../mk/bsd.prefs.mk"
-# Even with ../../x11/lesstif12 ELK's motif module does not seem to
-# work - it does compile though. So for now Motif support is comment out.
-#.if defined(ELK_USE_MOTIF)
-#ELK_USE_X11= # defined
-#.endif
+ELK_GUI?= none
+BUILD_DEFS+= ELK_GUI
+
+# We must strip the "-Wl," from the linker flags because they are saved
+# by elk to be used to invoke the real "ld", which won't understand them.
+#
+.if ${ELK_GUI} != "none"
+MAKE_ENV+= X11_LDFLAGS="${X11_LDFLAGS:S/-Wl,//}"
+. if !empty(ELK_GUI:Mxaw)
+USE_X11= # defined
+. include "../../mk/xaw.buildlink2.mk"
+LIBXAW:= ${LIBXAW:S/-Wl,//}
+ELK_SUBDIRS+= lib/xlib lib/xt lib/xaw
+PLIST_SRC+= ${PKGDIR}/PLIST.X11
+BUILD_DEFS+= XAW_TYPE
+. endif
+. if !empty(ELK_GUI:Mmotif)
+. include "../../mk/motif.buildlink2.mk"
+MOTIFLIB:= ${MOTIFLIB:S/-Wl,//}
+ELK_SUBDIRS+= lib/xm lib/xm/xt
+PLIST_SRC+= ${PKGDIR}/PLIST.Motif
+. endif
+.endif
+
+PLIST_SRC+= ${PKGDIR}/PLIST.base
+MAKE_ENV+= ELK_SUBDIRS="${ELK_SUBDIRS}"
do-configure:
${MV} ${WRKSRC}/src/stab-elf.c ${WRKSRC}/src/stab-elf.c-dist
${CP} ${FILESDIR}/stab-elf.c ${WRKSRC}/src
- @case `${MAKE} show-shlib-type` in \
+ @case ${OBJECT_FMT} in \
a.out) exetype=aout ;; \
ELF) exetype=elf ;; \
+ *) ${ECHO} "Unsupported object format: ${OBJECT_FMT}"; \
+ exit 1 ;; \
esac; \
${ECHO} "Setting up links for $$exetype on ${LOWER_OPSYS}"; \
${RM} -f ${WRKSRC}/config/untested/elf-solaris-cc; \
- ${LN} -s ${WRKSRC}/config/sun-sunos5-gcc ${WRKSRC}/config/untested/elf-solaris-cc; \
+ ${LN} -s ${WRKSRC}/config/sun-sunos5-gcc \
+ ${WRKSRC}/config/untested/elf-solaris-cc; \
${RM} -f ${WRKSRC}/config/system ${WRKSRC}/config/site; \
- ${LN} -s ${WRKSRC}/config/untested/$$exetype-${LOWER_OPSYS}-cc ${WRKSRC}/config/system; \
+ ${LN} -s ${WRKSRC}/config/untested/$$exetype-${LOWER_OPSYS}-cc \
+ ${WRKSRC}/config/system; \
for f in aout-netbsd elf-netbsd elf-solaris; do \
${RM} -f ${WRKSRC}/config/sites/$$f; \
- ${LN} -s ${WRKSRC}/config/sites/pkgsrc ${WRKSRC}/config/sites/$$f; \
+ ${LN} -s ${WRKSRC}/config/sites/pkgsrc \
+ ${WRKSRC}/config/sites/$$f; \
done; \
- ${LN} -s ${WRKSRC}/config/sites/$$exetype-${LOWER_OPSYS} ${WRKSRC}/config/site
-
-.if defined(ELK_USE_X11)
-. include "../../mk/x11.buildlink.mk"
-ELK_SUBDIRS+= lib/xlib
-ELK_SUBDIRS+= lib/xt
-PLIST_SRC+= ${PKGDIR}/PLIST.X11
-BUILD_DEFS+= ELK_USE_X11
-X11_LDFLAGS= -L${X11BASE}/lib
-. if ${_USE_RPATH} == "yes"
-X11_LDFLAGS+=-R${X11BASE}/lib
-. endif
-MAKE_ENV+= X11_LDFLAGS="${X11_LDFLAGS}"
-
-. include "../../mk/xaw.buildlink.mk"
-ELK_SUBDIRS+= lib/xaw
-BUILD_DEFS+= XAW_TYPE
-.if ${XAW_TYPE} == "xpm"
-EVAL_PREFIX+= LIBXAW_PREFIX=Xaw-Xpm
-.elif ${XAW_TYPE} == "3d"
-EVAL_PREFIX+= LIBXAW_PREFIX=Xaw3d
-.endif
-.if defined(LIBXAW_PREFIX)
-XAW_LDFLAGS+= -L${LIBXAW_PREFIX}/lib
-. if ${_USE_RPATH} == "yes"
-XAW_LDFLAGS+= -R${LIBXAW_PREFIX}/lib
-. endif
-.endif
-XAW_LIB= ${LIBXAW:M-l*}
-MAKE_ENV+= XAW_LDFLAGS="${XAW_LDFLAGS}"
-MAKE_ENV+= XAW_LIB="${XAW_LIB}"
-.endif
-
-#.if defined(ELK_USE_MOTIF)
-#USE_MOTIF12= # defined
-#. include "../../mk/motif.buildlink.mk"
-#ELK_SUBDIRS+= lib/xm
-#ELK_SUBDIRS+= lib/xm/xt
-#PLIST_SRC+= ${PKGDIR}/PLIST.Motif
-#BUILD_DEFS+= ELK_USE_MOTIF
-#MOTIF_LDFLAGS= -L${_MOTIFBASE}/lib
-#. if ${_USE_RPATH} == "yes"
-#MOTIF_LDFLAGS+= -R${_MOTIFBASE}/lib
-#. endif
-#MAKE_ENV+= MOTIF_LDFLAGS="${MOTIF_LDFLAGS}"
-#MOTIF_LIB= ${MOTIFLIB:M-l*}
-#MAKE_ENV+= MOTIF_LIB="${MOTIF_LIB}"
-#.endif
-
-PLIST_SRC+= ${PKGDIR}/PLIST.base
-
-MAKE_ENV+= ELK_SUBDIRS="${ELK_SUBDIRS}"
+ ${LN} -s ${WRKSRC}/config/sites/$$exetype-${LOWER_OPSYS} \
+ ${WRKSRC}/config/site
.include "../../mk/bsd.pkg.mk"
diff --git a/lang/elk/distinfo b/lang/elk/distinfo
index 706fcc30e2f..2170e8ebf4e 100644
--- a/lang/elk/distinfo
+++ b/lang/elk/distinfo
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.2 2002/01/09 23:04:54 seb Exp $
+$NetBSD: distinfo,v 1.3 2002/09/23 08:45:42 jlam Exp $
SHA1 (elk-3.0.tar.gz) = d62ae8a88e3206a578195611ace50168e6078661
Size (elk-3.0.tar.gz) = 762484 bytes
SHA1 (patch-aa) = 109e70fb6ba64b116c3b472b8586bf9c89c29348
SHA1 (patch-ab) = 62cac0487bf259aa481fbc23fd34b168475062fe
-SHA1 (patch-ac) = 05c35684e7e2c8c97768bf6f3f07760ba6181a15
+SHA1 (patch-ac) = 34c00b8d706834bc5ffd4dca21049b56d2ae35bd
SHA1 (patch-ad) = 421d3a738fa78db6c139331ca0d57987f94266bd
SHA1 (patch-ae) = d1514bc0391f59adbd2591b361348a2baee118f4
SHA1 (patch-af) = e3b2da075f099e7f3abff82afc255018c21639dd
diff --git a/lang/elk/patches/patch-ac b/lang/elk/patches/patch-ac
index 58be8b0d744..50dc0f24c2f 100644
--- a/lang/elk/patches/patch-ac
+++ b/lang/elk/patches/patch-ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.2 2002/01/09 23:04:55 seb Exp $
+$NetBSD: patch-ac,v 1.3 2002/09/23 08:45:43 jlam Exp $
--- config/sites/pkgsrc.orig Sun Jan 6 13:39:38 2002
+++ config/sites/pkgsrc
@@ -42,18 +42,18 @@ $NetBSD: patch-ac,v 1.2 2002/01/09 23:04:55 seb Exp $
+# -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11). -lXaw is needed to get the correct
+# definition of the vendor shell widget class
+
-+libxt="${X11_LDFLAGS} ${XAW_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${XAW_LIB}"
++libxt="${X11_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${LIBXAW}"
+
+# Libraries against which to link the Athena widgets extension (typically
+# identical to libxt above)
+
-+libxaw="${X11_LDFLAGS} ${XAW_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${XAW_LIB}"
++libxaw="${X11_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${LIBXAW}"
+
+
+# Libraries against which to link the Motif extension (typically like
+# libaw above with Xaw replaced by Xm)
+
-+libxmotif="${X11_LDFLAGS} ${MOTIF_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${MOTIF_LIB}"
++libxmotif="${X11_LDFLAGS} -lX11 -lXext -lICE -lSM -lXt -lXmu ${MOTIFLIB}"
+
+
+# Additional flags (typically -Isomething) to be supplied to the C