> > This should make use of ${X11BASE} instead of hardcoding /usr/X11R6.
> > Though in principle, /usr/local should be ${LOCALBASE} as well ...
> >
>
> In addition to pascal's comment, can you change also the lines with
> "gcc" hardcoded to ${CC}?
yes, makes sense,
diff attached with pascal's points and plus your tweak.
cheers,
gsoares
? plan9port-20140306p0.diff
Index: Makefile
===================================================================
RCS file: /cvs/ports/plan9/plan9port/Makefile,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 Makefile
--- Makefile 9 Mar 2014 20:26:48 -0000 1.5
+++ Makefile 11 Jun 2015 16:04:40 -0000
@@ -6,6 +6,7 @@ BROKEN-powerpc = threading issues
COMMENT = Plan 9 from user space
DISTNAME = plan9port-20140306
+REVISION = 0
CATEGORIES = plan9
@@ -37,6 +38,8 @@ PLAN9 = ${PREFIX}/plan9
NO_TEST = Yes
+SUBST_VARS+= CC
+
post-extract:
cd ${WRKSRC}/dict && tar xjf ${FULLDISTDIR}/pgw.tar.bz2
cd ${WRKSRC}/dict && tar xjf ${FULLDISTDIR}/roget.tar.bz2
@@ -48,7 +51,8 @@ post-patch:
OpenBSD-x86_64-asm.S
find ${WRKSRC} -name .cvsignore -exec rm -f {} \;
cd ${WRKSRC} && rm -rf .hg .hgignore .hgtags
-
+pre-configure:
+ ${SUBST_CMD} ${WRKSRC}/INSTALL
do-build:
cd ${WRKSRC} && env CC9="${CC}" CCFLAGS="${CFLAGS}" ./INSTALL -b
Index: patches/patch-INSTALL
===================================================================
RCS file: /cvs/ports/plan9/plan9port/patches/patch-INSTALL,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-INSTALL
--- patches/patch-INSTALL 9 Mar 2014 20:26:48 -0000 1.2
+++ patches/patch-INSTALL 11 Jun 2015 16:04:40 -0000
@@ -1,7 +1,24 @@
$OpenBSD: patch-INSTALL,v 1.2 2014/03/09 20:26:48 pascal Exp $
---- INSTALL.orig Thu Mar 6 11:00:08 2014
-+++ INSTALL Sun Mar 9 20:58:02 2014
-@@ -150,7 +150,7 @@ cd src
+
+INSTALL: append /usr/X11R6/include and /usr/X11R6/include/freetype2 to
+X11 headers detection, so that enable fontsrv build on OpenBSD.
+
+patch sent upstream:
+https://plan9port-review.googlesource.com/#/c/1290/
+
+--- INSTALL.orig Thu Mar 6 07:00:08 2014
++++ INSTALL Wed Jun 10 20:03:02 2015
+@@ -128,7 +128,8 @@ fi
+ if [ `uname` != Darwin ]; then
+ # Determine whether fontsrv X11 files are available.
+ rm -f a.out
+- gcc -o a.out -c -Iinclude -I/usr/include -I/usr/local/include
-I/usr/include/freetype2 -I/usr/local/include/freetype2 src/cmd/fontsrv/x11.c
>/dev/null 2>&1
++ ${CC} -o a.out -c -Iinclude -I/usr/include -I${LOCALBASE}/include
-I/usr/include/freetype2 -I${LOCALBASE}/include/freetype2 \
++ -I${X11BASE}/include -I${X11BASE}/include/freetype2
src/cmd/fontsrv/x11.c >/dev/null 2>&1
+ if [ -f a.out ]; then
+ echo " fontsrv dependencies found."
+ echo "FONTSRV=fontsrv" >>$PLAN9/config
+@@ -150,7 +151,7 @@ cd src
if $dobuild; then
if [ ! -x ../bin/mk ]; then
echo "* Building mk..."
@@ -10,7 +27,7 @@ $OpenBSD: patch-INSTALL,v 1.2 2014/03/09
fi
if [ ! -x ../bin/mk ]; then
echo "* Error: mk failed to build."
-@@ -158,7 +158,6 @@ if $dobuild; then
+@@ -158,7 +159,6 @@ if $dobuild; then
fi
echo "* Building everything (be patient)..."
@@ -18,7 +35,7 @@ $OpenBSD: patch-INSTALL,v 1.2 2014/03/09
mk libs-nuke
mk all || exit 1
if [ ! -x $PLAN9/src/cmd/o.cleanname -o ! -x $PLAN9/src/cmd/acme/o.acme
]; then
-@@ -213,5 +212,5 @@ if $doinstall; then
+@@ -213,5 +213,5 @@ if $doinstall; then
echo " PLAN9=$PLAN9 export PLAN9"
echo ' PATH=$PATH:$PLAN9/bin export PATH'
fi
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/plan9/plan9port/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 PLIST
--- pkg/PLIST 9 Mar 2014 20:26:48 -0000 1.3
+++ pkg/PLIST 11 Jun 2015 16:04:42 -0000
@@ -122,6 +122,7 @@ plan9/bin/doctype
@bin plan9/bin/factotum
@bin plan9/bin/file
@bin plan9/bin/fmt
+@bin plan9/bin/fontsrv
@bin plan9/bin/fortune
plan9/bin/fossil/
plan9/bin/fossil/conf