Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / swi-prolog-packages / Makefile
blobb2e399f47f3c5eff5328079ccceeece00d7b2f91
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}
6 PKGREVISION= 4
8 MAINTAINER= pkgsrc-users@NetBSD.org
9 COMMENT= Packages for SWI Prolog
11 GNU_CONFIGURE= yes
12 USE_GNU_READLINE= yes # uses rl_event_hook() interface
13 USE_TOOLS+= gmake pkg-config
14 MAKE_JOBS_SAFE= no
16 .include "../../mk/bsd.prefs.mk"
18 .if ${X11_TYPE} == "modular"
19 BUILD_DEPENDS+= modular-xorg-server-[0-9]*:../../x11/modular-xorg-server
20 .endif
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
27 BUILD_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
33 XPCE_VERSION= 6.6.66
34 PLIST_SUBST+= XPCE_VERSION=${XPCE_VERSION}
35 # Help with PLIST:
36 PRINT_PLIST_AWK+= {sub("${XPCE_VERSION}","$${XPCE_VERSION}")}
38 TEST_TARGET= check
40 pre-configure:
41 ${LN} -sf ${LOCALBASE}/bin/plld ${WRKSRC}/src
42 ${LN} -sf ${LOCALBASE}/bin/swi-prolog ${WRKSRC}/src
44 post-configure:
45 ${LN} -sf ${LOCALBASE}/bin/plld ${WRKSRC}/src
46 ${LN} -sf ${LOCALBASE}/bin/swi-prolog ${WRKSRC}/src
47 cd ${WRKSRC}/packages; \
48 ${SETENV} \
49 CPP=${CPP:Q} \
50 ${GMAKE} configure
52 pre-install: checkforx
54 # Based on misc/openoffice:
55 DISPLAY?= #empty, if unset
56 checkforx:
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`
62 sleep 5
63 DISPLAY= :2
64 . else
65 @${ECHO} "Error: Environment variable DISPLAY must be set"
66 @${ECHO} " and point to a connectible X server."
67 @${FALSE}
68 . endif #Xvfb
69 .endif #DISPLAY
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
77 teardownx:
78 ${ECHO} teardownx: Xvfb-PID: `${CAT} ${WRKDIR}/.Xvfb.pid`
79 sleep 5
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"