From 1a512ec048a5c607a01b9fd82561c1601ba87406 Mon Sep 17 00:00:00 2001 From: Christian Kellermann Date: Tue, 11 Dec 2012 12:45:45 -0500 Subject: fontsrv: fix build on OpenBSD 5.2 R=rsc CC=plan9port.codebot https://codereview.appspot.com/6850108 --- CONTRIBUTORS | 1 + INSTALL | 5 +++++ src/cmd/devdraw/mkwsysrules.sh | 1 + src/cmd/fontsrv/freetyperules.sh | 7 ++++++- src/cmd/fontsrv/mkfile | 2 +- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 72154085..63effd2a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -12,6 +12,7 @@ Anthony Sorace Arvindh Rajesh Tamilmani Benjamin Huntsman Caio Oliveira +Christian Kellermann Christopher Brannon David du Colombier <0intro@gmail.com> David Jeannot diff --git a/INSTALL b/INSTALL index 7625cc80..1ce9bd0c 100755 --- a/INSTALL +++ b/INSTALL @@ -45,6 +45,11 @@ rm -f config echo "* Compiler version:" 9c -v 2>&1 | grep -v 'Configured with:' | grep -i version | sed 's/^/ /' +if [ `uname` = OpenBSD ]; then + echo "* Running on OpenBSD, adjusting linker flags" + echo "LDFLAGS='-L/usr/X11R6/lib -pthread'" >> $PLAN9/config +fi + if [ `uname` = Linux ]; then # On Linux, we use the kernel version to decide whether # to use pthreads or not. On 2.6 versions that aren't diff --git a/src/cmd/devdraw/mkwsysrules.sh b/src/cmd/devdraw/mkwsysrules.sh index dde44c81..9c422261 100644 --- a/src/cmd/devdraw/mkwsysrules.sh +++ b/src/cmd/devdraw/mkwsysrules.sh @@ -45,6 +45,7 @@ fi echo 'WSYSTYPE='$WSYSTYPE echo 'X11='$X11 +echo 'X11H='$X11H if [ $WSYSTYPE = x11 ]; then echo 'CFLAGS=$CFLAGS '$X11H diff --git a/src/cmd/fontsrv/freetyperules.sh b/src/cmd/fontsrv/freetyperules.sh index ca7a0261..7b9a002f 100644 --- a/src/cmd/fontsrv/freetyperules.sh +++ b/src/cmd/fontsrv/freetyperules.sh @@ -1,7 +1,12 @@ #!/bin/sh if [ "x$1" = "xx11" ]; then - echo 'CFLAGS=$CFLAGS -I/usr/include/freetype2' + if [ "x$2" = "x" ]; then + i=/usr/include + else + i=$2 + fi + echo 'CFLAGS=$CFLAGS '$i'/freetype2' echo 'LDFLAGS=$LDFLAGS -lfontconfig -lfreetype -lz' fi diff --git a/src/cmd/fontsrv/mkfile b/src/cmd/fontsrv/mkfile index 9fbbd520..eed0355a 100644 --- a/src/cmd/fontsrv/mkfile +++ b/src/cmd/fontsrv/mkfile @@ -1,6 +1,6 @@ <$PLAN9/src/mkhdr <|sh ../devdraw/mkwsysrules.sh -<|sh freetyperules.sh $WSYSTYPE +<|sh freetyperules.sh $WSYSTYPE $X11H TARG=fontsrv -- cgit v1.2.3