| @@ -1,59 +1,60 @@ | | | @@ -1,59 +1,60 @@ |
1 | # $NetBSD: Makefile,v 1.54 2016/06/08 19:22:44 wiz Exp $ | | 1 | # $NetBSD: Makefile,v 1.55 2016/07/09 09:47:11 rillig Exp $ |
2 | | | 2 | |
3 | DISTNAME= Curses-1.34 | | 3 | DISTNAME= Curses-1.34 |
4 | PKGNAME= p5-${DISTNAME} | | 4 | PKGNAME= p5-${DISTNAME} |
5 | PKGREVISION= 1 | | 5 | PKGREVISION= 1 |
6 | CATEGORIES= devel perl5 | | 6 | CATEGORIES= devel perl5 |
7 | MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Curses/} | | 7 | MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Curses/} |
8 | | | 8 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= http://search.cpan.org/dist/Curses/ | | 10 | HOMEPAGE= http://search.cpan.org/dist/Curses/ |
11 | COMMENT= Perl5 module for terminal screen handling and optimization | | 11 | COMMENT= Perl5 module for terminal screen handling and optimization |
12 | # really it's gnu-gpl-v1+ OR artistic-1.0, but currently we don't have gplv1 | | 12 | # really it's gnu-gpl-v1+ OR artistic-1.0, but currently we don't have gplv1 |
13 | LICENSE= ${PERL5_LICENSE} | | 13 | LICENSE= ${PERL5_LICENSE} |
14 | | | 14 | |
15 | PERL5_PACKLIST= auto/Curses/.packlist | | 15 | PERL5_PACKLIST= auto/Curses/.packlist |
16 | | | 16 | |
17 | # We should really work out the location of the system forms.h | | | |
18 | SUBST_STAGE.h_form = post-configure | | | |
19 | SUBST_MESSAGE.h_form = Hard wiring form.h | | | |
20 | SUBST_FILES.h_form = c-config.h | | | |
21 | SUBST_SED.h_form = -e 's,<form.h>,"/usr/include/form.h",g' | | | |
22 | | | 17 | |
23 | MAKE_PARAMS+= FORMS MENUS | | 18 | MAKE_PARAMS+= FORMS MENUS |
24 | | | 19 | |
25 | .include "../../lang/perl5/module.mk" | | 20 | .include "../../lang/perl5/module.mk" |
26 | .include "../../mk/curses.buildlink3.mk" | | 21 | .include "../../mk/curses.buildlink3.mk" |
27 | | | 22 | |
28 | .if ${CURSES_TYPE} == "curses" | | 23 | .if ${CURSES_TYPE} == "curses" |
| | | 24 | # We should really work out the location of the system forms.h |
29 | SUBST_CLASSES+= h_form | | 25 | SUBST_CLASSES+= h_form |
| | | 26 | SUBST_STAGE.h_form= post-configure |
| | | 27 | SUBST_MESSAGE.h_form= Hard wiring form.h |
| | | 28 | SUBST_FILES.h_form= c-config.h |
| | | 29 | SUBST_SED.h_form= -e 's,<form.h>,"/usr/include/form.h",g' |
| | | 30 | |
30 | .elif ${CURSES_TYPE} == "ncurses" || ${CURSES_TYPE} == "ncursesw" | | 31 | .elif ${CURSES_TYPE} == "ncurses" || ${CURSES_TYPE} == "ncursesw" |
31 | MAKE_PARAMS+= PANELS | | 32 | MAKE_PARAMS+= PANELS |
32 | # Don't link to system termcap as we're using ncurses | | 33 | # Don't link to system termcap as we're using ncurses |
33 | BUILDLINK_TRANSFORM+= rm:-ltermcap | | 34 | BUILDLINK_TRANSFORM+= rm:-ltermcap |
34 | | | 35 | |
35 | # Use the FreeBSD ncurses config as that works fine for pkgsrc | | 36 | # Use the FreeBSD ncurses config as that works fine for pkgsrc |
36 | pre-configure: | | 37 | pre-configure: |
37 | ${LN} -sf ${WRKSRC}/hints/c-freebsd.ncurses.h ${WRKSRC}/c-config.h | | 38 | ${LN} -sf ${WRKSRC}/hints/c-freebsd.ncurses.h ${WRKSRC}/c-config.h |
38 | .endif | | 39 | .endif |
39 | | | 40 | |
40 | # Pass appropriate CURSES_LIBTYPE so Curses will link to the matching panel/menu/form library | | 41 | # Pass appropriate CURSES_LIBTYPE so Curses will link to the matching panel/menu/form library |
41 | .if ${CURSES_TYPE} == "curses" | | 42 | .if ${CURSES_TYPE} == "curses" |
42 | . if ${OPSYS} == "Linux" | | 43 | . if ${OPSYS} == "Linux" |
43 | CURSES_LIBTYPE= ncurses | | 44 | CURSES_LIBTYPE= ncurses |
44 | . else | | 45 | . else |
45 | CURSES_LIBTYPE= bsd | | 46 | CURSES_LIBTYPE= bsd |
46 | . endif | | 47 | . endif |
47 | .elif ${CURSES_TYPE} == "ncurses" | | 48 | .elif ${CURSES_TYPE} == "ncurses" |
48 | CURSES_LIBTYPE= ncurses | | 49 | CURSES_LIBTYPE= ncurses |
49 | .elif ${CURSES_TYPE} == "ncursesw" | | 50 | .elif ${CURSES_TYPE} == "ncursesw" |
50 | CURSES_LIBTYPE= ncursesw | | 51 | CURSES_LIBTYPE= ncursesw |
51 | .endif | | 52 | .endif |
52 | | | 53 | |
53 | .if defined(CURSES_LIBTYPE) | | 54 | .if defined(CURSES_LIBTYPE) |
54 | MAKE_ENV+= CURSES_LIBTYPE=${CURSES_LIBTYPE} | | 55 | MAKE_ENV+= CURSES_LIBTYPE=${CURSES_LIBTYPE} |
55 | MAKE_ENV+= CURSES_CFLAGS=${BUILDLINK_INCDIRS.${CURSES_TYPE}:S/^/-I/} | | 56 | MAKE_ENV+= CURSES_CFLAGS=${BUILDLINK_INCDIRS.${CURSES_TYPE}:@dir@-I${dir}@:Q} |
56 | MAKE_ENV+= CURSES_LDFLAGS=${BUILDLINK_LDADD.${CURSES_TYPE}} | | 57 | MAKE_ENV+= CURSES_LDFLAGS=${BUILDLINK_LDADD.${CURSES_TYPE}:Q} |
57 | .endif | | 58 | .endif |
58 | | | 59 | |
59 | .include "../../mk/bsd.pkg.mk" | | 60 | .include "../../mk/bsd.pkg.mk" |