aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordaichi <daichi@FreeBSD.org>2003-07-10 16:26:50 +0800
committerdaichi <daichi@FreeBSD.org>2003-07-10 16:26:50 +0800
commitc6271d4b803d685bc979f5d8cb6b6c9195d8b94e (patch)
treedfe5add8c6d5ceaba52f1cb6dd7686e3353a3ed2
parent0bbb0864314e255bdd03a645e904a0fa798c9b14 (diff)
downloadfreebsd-ports-gnome-c6271d4b803d685bc979f5d8cb6b6c9195d8b94e.tar.gz
freebsd-ports-gnome-c6271d4b803d685bc979f5d8cb6b6c9195d8b94e.tar.zst
freebsd-ports-gnome-c6271d4b803d685bc979f5d8cb6b6c9195d8b94e.zip
fix graphics/gd2: gd2/Makefile change to compile gd-nox11 correctly
Submitted by: KATO Tsuguru <tkato@prontomail.com> Pointed out by: Jon Noack <noackjr@alumni.rice.edu>
-rw-r--r--graphics/gd2/Makefile18
-rw-r--r--graphics/gd2/files/Makefile.bsd15
2 files changed, 15 insertions, 18 deletions
diff --git a/graphics/gd2/Makefile b/graphics/gd2/Makefile
index 619ba411b1a6..deffaac075c4 100644
--- a/graphics/gd2/Makefile
+++ b/graphics/gd2/Makefile
@@ -22,17 +22,29 @@ LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
LATEST_LINK= gd2
-MAKE_ENV= WRKSRC="${WRKSRC}"
+MAKE_ENV= WRKSRC="${WRKSRC}" LDADD="${LDADD}"
MAKEFILE= ${FILESDIR}/Makefile.bsd
INSTALLS_SHLIB= yes
-.if defined(WITHOUT_X11)
+CFLAGS+= -I${WRKSRC} -I${LOCALBASE}/include/freetype2/freetype \
+ -I${LOCALBASE}/include/freetype2 -I${LOCALBASE}/include \
+ -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -DHAVE_LIBZ
+LDADD= -L${LOCALBASE}/lib -lpng -lz -ljpeg -lfreetype -lm
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITHOUT_X11) || defined(WITHOUT_XPM)
PKGNAMESUFFIX= -nox11
.if !defined(WITHOUT_XPM)
LIB_DEPENDS+= Xpm:${PORTSDIR}/graphics/xpm
+CFLAGS+= -I${X11BASE}/include/X11 -I${X11BASE}/include -DHAVE_LIBXPM \
+ -DXPM_NOX
+LDADD+= -L${X11BASE}/lib -lXpm
.endif
.else
USE_XPM= yes
+CFLAGS+= -I${X11BASE}/include/X11 -I${X11BASE}/include -DHAVE_LIBXPM
+LDADD+= -L${X11BASE}/lib -lXpm -lX11
.endif
.if defined(WITH_LZW) || defined(HAVE_UNISYS_LICENSE) || \
@@ -62,4 +74,4 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/index.html ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/graphics/gd2/files/Makefile.bsd b/graphics/gd2/files/Makefile.bsd
index 8c45bb6c04e5..81bab56e93e5 100644
--- a/graphics/gd2/files/Makefile.bsd
+++ b/graphics/gd2/files/Makefile.bsd
@@ -18,21 +18,6 @@ INCS= gd.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h \
SHLIB_NAME!= ${MAKE} -V SHLIB_NAME LIB=${LIB} \
SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR} -f ${MAKEDIR}/bsd.lib.mk
-CFLAGS+=-I${.CURDIR} -I${LOCALBASE}/include/freetype2/freetype \
- -I${LOCALBASE}/include/freetype2 -I${LOCALBASE}/include \
- -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE -DHAVE_LIBZ
-LDADD= -L${LOCALBASE}/lib -lpng -lz -ljpeg -lfreetype -lm
-
-.ifndef WITHOUT_XPM
-CFLAGS+=-I${X11BASE}/include/X11 -I${X11BASE}/include -DHAVE_XPM
-LDADD+= -L${X11BASE}/lib -lXpm
-.ifdef WITHOUT_X11
-CFLAGS+=-DXPM_NOX
-.else
-LDADD+= -lX11
-.endif
-.endif
-
# The package comes with tests, but without any sort of test-harness,
# to run them all automaticly. So building tests is disabled here. -mi
all: lib${LIB}.a ${SHLIB_NAME} ${PROGS} # ${TESTS}