1 # $NetBSD: Makefile,v 1.35 2013/02/06 23:22:39 jperkin Exp $
3 .
include "../../lang/swi-prolog-lite/Makefile.common"
5 PKGNAME
= swi-prolog-packages-
${SWIPLVERS}
8 MAINTAINER
= pkgsrc-users@NetBSD.org
9 COMMENT
= Packages for SWI Prolog
12 USE_GNU_READLINE
= yes
# uses rl_event_hook() interface
13 USE_TOOLS
+= gmake pkg-config
16 .
include "../../mk/bsd.prefs.mk"
18 .if
${X11_TYPE} == "modular"
19 BUILD_DEPENDS
+= modular-xorg-server-
[0-9]*:..
/..
/x11
/modular-xorg-server
22 CONFIGURE_ENV
+= PL
=swi-prolog
23 CONFIGURE_ENV
+= ARCH
=${MACHINE_GNU_PLATFORM} # make PLIST consistent
24 CONFIGURE_ARGS
+= --without-jpl
26 CONFIGURE_DIRS
+= . packages
28 INSTALL_DIRS
+= packages
30 INSTALLATION_DIRS
= bin lib
/swi-prolog-
${PKGVERSION_NOREV}/bin
/${MACHINE_GNU_PLATFORM} \
31 lib
/swi-prolog-
${PKGVERSION_NOREV}/include ${PKGMANDIR}/man1
34 PLIST_SUBST
+= XPCE_VERSION
=${XPCE_VERSION}
36 PRINT_PLIST_AWK
+= {sub
("${XPCE_VERSION}","$${XPCE_VERSION}")}
41 ${LN} -sf
${LOCALBASE}/bin
/plld
${WRKSRC}/src
42 ${LN} -sf
${LOCALBASE}/bin
/swi-prolog
${WRKSRC}/src
45 ${LN} -sf
${LOCALBASE}/bin
/plld
${WRKSRC}/src
46 ${LN} -sf
${LOCALBASE}/bin
/swi-prolog
${WRKSRC}/src
47 cd
${WRKSRC}/packages
; \
52 pre-install
: checkforx
54 # Based on misc/openoffice:
55 DISPLAY?
= #empty, if unset
57 .if
${DISPLAY} == "" ||
${DISPLAY_OK
:!${X11BASE}/bin
/xdpyinfo
>/dev
/null
2>&1 && ${ECHO} YES ||
${ECHO} NO
!} == "NO"
58 . if exists
(${X11BASE}/bin
/Xvfb
)
59 -${X11BASE}/bin
/Xvfb
:2 & \
60 ${ECHO} $$! >${WRKDIR}/.Xvfb.pid
61 ${ECHO} checkforx
: Xvfb-PID
: `${CAT} ${WRKDIR}/.Xvfb.pid`
65 @
${ECHO} "Error: Environment variable DISPLAY must be set"
66 @
${ECHO} " and point to a connectible X server."
71 MAKE_ENV
+= DISPLAY
=${DISPLAY
:Q
}
73 post-install
: teardownx
74 ${RM} -f
${LOCALBASE}/lib
/swi-prolog-
${SWIPLVERS}/xpce-
${XPCE_VERSION}/prolog
/lib
/.pwd
75 ${INSTALL_DATA} ${WRKSRC}/packages
/xpce
/man
/xpce-client
.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
/xpce-client
.1
76 ${INSTALL_DATA} ${WRKSRC}/packages
/xpce
/man
/xpce
.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
/xpce
.1
78 ${ECHO} teardownx
: Xvfb-PID
: `${CAT} ${WRKDIR}/.Xvfb.pid`
80 -kill
`${CAT} ${WRKDIR}/.Xvfb.pid`
81 ${RM} -f
${WRKDIR}/.Xvfb.pid
83 # I need this on FreeBSD, perhaps this depends on GCC behaviour:
84 CHECK_WRKREF_SKIP
= lib
/swi-prolog-
${SWIPLVERS}/xpce-
${XPCE_VERSION}/lib
/${MACHINE_GNU_PLATFORM}/pl2xpce.so
87 .
include "../../lang/swi-prolog-lite/buildlink3.mk"
88 .
include "../../mk/jpeg.buildlink3.mk"
89 .
include "../../devel/gmp/buildlink3.mk"
90 .
include "../../devel/ncurses/buildlink3.mk"
91 .
include "../../devel/readline/buildlink3.mk"
92 .
include "../../security/openssl/buildlink3.mk"
93 .
include "../../x11/libXft/buildlink3.mk"
94 .
include "../../x11/libXinerama/buildlink3.mk"
95 .
include "../../x11/libXpm/buildlink3.mk"
96 .
include "../../x11/libXt/buildlink3.mk"
97 .
include "../../mk/pthread.buildlink3.mk"
98 .
include "../../mk/bsd.pkg.mk"