When in DEBUG mode, add --enable-test to CONFIGURE_ARGS as it helps

greatly for debugging (needs cairo for building).

Add two patches (adapted from Ubuntu) to use installed ghostscript
headers instead of the bundle ones.
This commit is contained in:
ajacoutot 2009-08-18 12:12:46 +00:00
parent acd824f975
commit 279517e337
3 changed files with 48 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.2 2009/01/19 14:03:53 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.3 2009/08/18 12:12:46 ajacoutot Exp $
# libgs from ghostscript is only provided on shared libs archs
SHARED_ONLY= Yes
@ -6,7 +6,7 @@ SHARED_ONLY= Yes
COMMENT= library for rendering Postscript documents
DISTNAME= libspectre-0.2.2
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
CATEGORIES= print
SHARED_LIBS= spectre 0.0 # .2.2
@ -28,7 +28,13 @@ USE_LIBTOOL= Yes
CONFIGURE_STYLE=gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib -pthread"
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--disable-test
CONFIGURE_ARGS= ${CONFIGURE_SHARED}
.ifdef DEBUG
BUILD_DEPENDS+= ::graphics/cairo
CONFIGURE_ARGS+=--enable-test
.else
CONFIGURE_ARGS+=--disable-test
.endif
.include <bsd.port.mk>

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-configure,v 1.1 2009/08/18 12:12:46 ajacoutot Exp $
Use system ghostscript headers.
--- configure.orig Tue Aug 18 14:03:31 2009
+++ configure Tue Aug 18 14:03:46 2009
@@ -21754,7 +21754,7 @@ _ACEOF
fi
-ac_config_files="$ac_config_files Makefile Doxyfile libspectre/Makefile libspectre/spectre-version.h libspectre/ghostscript/Makefile test/Makefile libspectre.pc"
+ac_config_files="$ac_config_files Makefile Doxyfile libspectre/Makefile libspectre/spectre-version.h test/Makefile libspectre.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -22367,7 +22367,6 @@ do
"Doxyfile") CONFIG_FILES="$CONFIG_FILES Doxyfile" ;;
"libspectre/Makefile") CONFIG_FILES="$CONFIG_FILES libspectre/Makefile" ;;
"libspectre/spectre-version.h") CONFIG_FILES="$CONFIG_FILES libspectre/spectre-version.h" ;;
- "libspectre/ghostscript/Makefile") CONFIG_FILES="$CONFIG_FILES libspectre/ghostscript/Makefile" ;;
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
"libspectre.pc") CONFIG_FILES="$CONFIG_FILES libspectre.pc" ;;

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-libspectre_Makefile_in,v 1.1 2009/08/18 12:12:46 ajacoutot Exp $
Use system ghostscript headers.
--- libspectre/Makefile.in.orig Tue Aug 18 14:03:58 2009
+++ libspectre/Makefile.in Tue Aug 18 14:04:05 2009
@@ -213,7 +213,7 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = ghostscript
+SUBDIRS =
INCLUDES = \
-I$(top_builddir) \
-I$(srcdir) \