- simplify matching pattern.
- simplify version checking. - preparation for adding the drivers which version is 2.5.2. - fix build of some drivers on 4.X. [*1] Reported by: hrs [*1]
This commit is contained in:
parent
106bd3daba
commit
eccb35c6a1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=117438
@ -11,7 +11,13 @@ PORTVERSION?= 1.3.2
|
||||
CATEGORIES?= print
|
||||
MASTER_SITES= http://www.epkowa3.on.arena.ne.jp/pips/data/%SUBDIR%/
|
||||
|
||||
.if ${PORTVERSION} == 2.1.2
|
||||
PIPS_MAJOR= ${PORTVERSION:C|^([0-9]+).([0-9]+).([0-9]+)$|\1|}
|
||||
PIPS_MINOR= ${PORTVERSION:C|^([0-9]+).([0-9]+).([0-9]+)$|\2|}
|
||||
#PIPS_PATCH= ${PORTVERSION:C|^([0-9]+).([0-9]+).([0-9]+)$|\3|}
|
||||
PIPS_LEVEL!= printf "%02d%02d" ${PIPS_MAJOR} ${PIPS_MINOR}
|
||||
#PIPS_VERSION!= printf "%02d%02d%02d" ${PIPS_MAJOR} ${PIPS_MINOR} ${PIPS_PATCH}
|
||||
|
||||
.if ${PIPS_LEVEL} < 0206
|
||||
DIST_TYPE= lpr
|
||||
.else
|
||||
DIST_TYPE?= lpr_and_caps
|
||||
@ -29,7 +35,7 @@ MASTER_SITE_SUBDIR= pm${PRTYPE}c
|
||||
MASTER_SITE_SUBDIR= pm${PRTYPE}pxlpr
|
||||
.elif ${PRTYPE} == v500 || ${PRTYPE} == v600
|
||||
MASTER_SITE_SUBDIR= px${PRTYPE}lpr
|
||||
.elif ${PORTVERSION} == 2.1.2
|
||||
.elif ${PIPS_LEVEL} == 0201
|
||||
MASTER_SITE_SUBDIR= ${PRTYPE}_21
|
||||
#.elif ${PRTYPE} == 740 || ${PRTYPE} == 870
|
||||
.elif ${DIST_TYPE} == cups
|
||||
@ -81,11 +87,11 @@ PLIST_SUB= PRTYPE=${PRTYPE} \
|
||||
|
||||
CPPFLAGS= -I${LOCALBASE}/include
|
||||
LDFLAGS= -L${LOCALBASE}/lib
|
||||
.if ${PORTVERSION} == 2.1.2 || ${PORTVERSION} == 2.6.2
|
||||
.if ${PIPS_MAJOR} >= 2
|
||||
CONFLICTS= pips*-2.*
|
||||
USE_RC_SUBR= yes
|
||||
EXTRA_PATCHES= ${FILESDIR}/extra-patch-2.6.2
|
||||
.if ${PORTVERSION} != 2.1.2 && ${DIST_TYPE} != cups
|
||||
.if ${PIPS_LEVEL} != 0201 && ${DIST_TYPE} != cups
|
||||
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-2.6.2-dtrfilter
|
||||
.endif
|
||||
.if ${DIST_TYPE} == lpr
|
||||
@ -140,6 +146,10 @@ PRT_MODEL= PM820CUG
|
||||
LIB_FILE= libpm${PRTYPE}px.so
|
||||
MODEL_FILE= ekpm${PRTYPE}px.ppd
|
||||
PRT_MODEL= PM${PRTYPE}PX
|
||||
.elif ${PRTYPE} == g700 || ${PRTYPE} == g800
|
||||
LIB_FILE= libpm${PRTYPE}.so
|
||||
MODEL_FILE= ekpm${PRTYPE}.ppd
|
||||
PRT_MODEL= PM${PRTYPE:U}
|
||||
.elif ${PRTYPE} == v500 || ${PRTYPE} == v600
|
||||
LIB_FILE= libpx${PRTYPE}.so
|
||||
MODEL_FILE= ekpx${PRTYPE}.ppd
|
||||
@ -151,12 +161,16 @@ PRT_MODEL= PM${PRTYPE}C
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${PIPS_LEVEL} == 0201 || (${PIPS_LEVEL} >= 0205 && ${DIST_TYPE} == lpr)
|
||||
EKPNAVI_VER= 1.1.2
|
||||
.endif
|
||||
.if defined(EKPNAVI_VER) || ${DIST_TYPE} == cups
|
||||
.if ${PRTYPE} == 970
|
||||
EKPSTM_VER= 1.1.2
|
||||
.else
|
||||
EKPSTM_VER= 1.0.2
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${DIST_TYPE} == cups
|
||||
CUPSOPT_FILE= cupsopt_pm${PRTYPE}c.csv
|
||||
@ -165,9 +179,9 @@ CUPSOPT_FILE= cupsopt.csv
|
||||
.endif
|
||||
LIB_README= ${LIB_FILE:S/.so$//}.readme
|
||||
PAPERSIZE?= a4
|
||||
.if ${PORTVERSION} == 2.1.2 || ${PORTVERSION} == 2.6.2
|
||||
.if ${PIPS_MAJOR} >= 2
|
||||
FILTER_SRC= filter.tmp
|
||||
.if ${PORTVERSION} == 2.1.2
|
||||
.if ${PIPS_LEVEL} == 0201
|
||||
PIPS= ""
|
||||
CUPS= "@comment "
|
||||
EKPNAVI= ""
|
||||
@ -206,7 +220,7 @@ RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
|
||||
RC_SUBR=${RC_SUBR} \
|
||||
PRT_MODEL=${PRT_MODEL}
|
||||
WITH_EKPD?= yes
|
||||
.elif ${PORTVERSION} == 1.3.2
|
||||
.elif ${PIPS_MAJOR} == 1
|
||||
FILTER_SRC= filter.org
|
||||
PLIST= ${MASTERDIR}/pkg-plist132
|
||||
.endif
|
||||
@ -215,25 +229,19 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
DOCS= COPYING COPYING.KOWA COPYING.KOWA.ja COPYING.LIB
|
||||
|
||||
post-extract:
|
||||
.if ${PORTVERSION} == 2.1.2 || \
|
||||
(${PORTVERSION} == 2.6.2 && ${DIST_TYPE} == lpr)
|
||||
.if defined(EKPNAVI_VER)
|
||||
cd ${WRKSRC}/ekpnavi && ${TAR} xzf ekpnavi-${EKPNAVI_VER}.tar.gz
|
||||
.endif
|
||||
.if ${PORTVERSION} == 2.1.2 || \
|
||||
(${PORTVERSION} == 2.6.2 && ${DIST_TYPE} == lpr) || \
|
||||
${DIST_TYPE} == cups
|
||||
.if defined(EKPSTM_VER)
|
||||
cd ${WRKSRC}/ekpstm && ${TAR} xzf ekpstm-${EKPSTM_VER}.tar.gz
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if ${PORTVERSION} == 2.1.2 || \
|
||||
(${PORTVERSION} == 2.6.2 && ${DIST_TYPE} == lpr)
|
||||
.if defined(EKPNAVI_VER)
|
||||
cd ${WRKSRC}/ekpnavi/ekpnavi-${EKPNAVI_VER} && \
|
||||
patch -p < ${FILESDIR}/ekpnavi-${EKPNAVI_VER}.diff
|
||||
.endif
|
||||
.if ${PORTVERSION} == 2.1.2 || \
|
||||
(${PORTVERSION} == 2.6.2 && ${DIST_TYPE} == lpr) || \
|
||||
${DIST_TYPE} == cups
|
||||
.if defined(EKPSTM_VER)
|
||||
cd ${WRKSRC}/ekpstm/ekpstm-${EKPSTM_VER} && \
|
||||
patch -p < ${FILESDIR}/ekpstm-${EKPSTM_VER}.diff
|
||||
.endif
|
||||
@ -243,7 +251,7 @@ post-patch:
|
||||
${WRKSRC}/Makefile.in
|
||||
${REINPLACE_CMD} -e 's,^prefix=/usr$$,,' -e 's,^sysconfdir=/etc$$,,' \
|
||||
-e 's,/usr/local/EPKowa,${PREFIX}/libexec/pips,' \
|
||||
-e 's,_nl_domain_bindings,libintl_nl_domain_bindings,' \
|
||||
-e 's,_nl_domain_bindings,libintl&,' \
|
||||
${WRKSRC}/configure
|
||||
${REINPLACE_CMD} -e 's,^pkgdatadir.*$$,pkgdatadir = ${DOCSDIR},' \
|
||||
${WRKSRC}/doc/Makefile.in
|
||||
@ -255,7 +263,7 @@ post-patch:
|
||||
-e 's,^GSCONF=%gsconfig_name%$$,GSCONF=${PREFIX}/bin/%gsconfig_name%,' \
|
||||
${WRKSRC}/src/${FILTER_SRC}
|
||||
.endif
|
||||
.if ${PORTVERSION} == 1.3.2
|
||||
.if ${PIPS_MAJOR} == 1
|
||||
${REINPLACE_CMD} -e 's,^PREFIX.*$$,PREFIX=${PREFIX},' \
|
||||
-e 's,^ETCDIR.*$$,ETCDIR=${PREFIX}/etc,' \
|
||||
-e 's,/dev/lp0,/dev/lpt0,' \
|
||||
@ -264,37 +272,46 @@ post-patch:
|
||||
-e 's,:/usr/local/bin$$,:${PREFIX}/bin,' \
|
||||
${WRKSRC}/setup/inst-post.sh
|
||||
.endif
|
||||
.if ${PORTVERSION} == 2.6.2 && ${DIST_TYPE} != cups
|
||||
.if ${PIPS_LEVEL} >= 0205 && ${DIST_TYPE} != cups
|
||||
${REINPLACE_CMD} -e 's,dtrfilter_LDADD = -ldl,dtrfilter_LDADD =,' \
|
||||
${WRKSRC}/dtrfilter/Makefile.in
|
||||
${REINPLACE_CMD} -e 's,/etc/pipsrc,${PREFIX}/etc/pipsrc,' \
|
||||
${REINPLACE_CMD} -e 's,/etc/pipsrc,${PREFIX}&,' \
|
||||
-e 's,/usr/local/EPKowa,${PREFIX}/libexec/pips,' \
|
||||
${WRKSRC}/layout_script/gsconfig
|
||||
.endif
|
||||
.if ${PORTVERSION} == 2.1.2 || ${PORTVERSION} == 2.6.2
|
||||
${REINPLACE_CMD} -e 's,/etc/ekpdrc,${PREFIX}/etc/ekpdrc,' \
|
||||
.if ${PIPS_MAJOR} >= 2
|
||||
${REINPLACE_CMD} -e 's,/etc/ekpdrc,${PREFIX}&,' \
|
||||
${WRKSRC}/ekpd/cbtd_setup.c
|
||||
${REINPLACE_CMD} -e 's,/dev/lp0,/dev/ulpt0,' \
|
||||
-e 's,^SUBDIRS = rc$$,#SUBDIRS = rc,' \
|
||||
-e 's,^SUBDIRS = rc$$,#&,' \
|
||||
${WRKSRC}/ekpd/Makefile.in
|
||||
.if ${DIST_TYPE} != cups
|
||||
${REINPLACE_CMD} -e 's,/etc/ekpdrc,${PREFIX}/etc/ekpdrc,' \
|
||||
${WRKSRC}/src/setup.c
|
||||
${REINPLACE_CMD} -e 's,/etc/ekpdrc,${PREFIX}&,' ${WRKSRC}/src/setup.c
|
||||
.endif
|
||||
.if ${PORTVERSION} == 2.6.2 || ${DIST_TYPE} == lpr
|
||||
${REINPLACE_CMD} -e 's,@CUPS_LIBS@,@CUPS_LIBS@ -lintl,' \
|
||||
-e 's,^INCLUDES = @GTK_CFLAGS@ $$,INCLUDES = @GTK_CFLAGS@ $$(INCLTDL),' \
|
||||
.if ${PIPS_LEVEL} >= 0206 || ${DIST_TYPE} == lpr
|
||||
${REINPLACE_CMD} -e 's,@CUPS_LIBS@,& -lintl,' \
|
||||
-e 's,^INCLUDES = @GTK_CFLAGS@ $$,&$$(INCLTDL),' \
|
||||
${WRKSRC}/src/Makefile.in
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${PORTVERSION} == 2.6.2 && ${DIST_TYPE} != lpr && ${DIST_TYPE} != cups
|
||||
pre-configure:
|
||||
.if ${PIPS_LEVEL} >= 0206 && ${DIST_TYPE} != lpr && ${DIST_TYPE} != cups
|
||||
cd ${WRKSRC}/libltdl && ${LOCALBASE}/bin/autoconf253
|
||||
.endif
|
||||
|
||||
post-configure:
|
||||
.if defined(EKPNAVI_VER)
|
||||
cd ${WRKSRC}/ekpnavi/ekpnavi-${EKPNAVI_VER} && \
|
||||
${CONFIGURE_ENV} ./configure --prefix=${PREFIX}
|
||||
.endif
|
||||
.if defined(EKPSTM_VER)
|
||||
cd ${WRKSRC}/ekpstm/ekpstm-${EKPSTM_VER} && \
|
||||
${CONFIGURE_ENV} ./configure --prefix=${PREFIX}
|
||||
.endif
|
||||
|
||||
post-build:
|
||||
.if ${PORTVERSION} == 1.3.2
|
||||
.if ${PIPS_MAJOR} == 1
|
||||
${SED} -e 's,$$GSCONF | $$PIPS -ui C,TMP=/tmp/pips.$$$$;\
|
||||
trap "rm -rf $$TMP; exit" 0 2 3 4 6 7 8 10 11 12 13 15;\
|
||||
psselect -r > $$TMP;\
|
||||
@ -303,7 +320,8 @@ $${GSCONF} < $$TMP | $${PIPS} -ui C,' \
|
||||
trap "rm -rf $$TMP; exit" 0 2 3 4 6 7 8 10 11 12 13 15;\
|
||||
psselect -r > $$TMP;\
|
||||
$${GSCONF} < $$TMP | $${PIPS} -ui C,' \
|
||||
${WRKSRC}/src/filter${PRTYPE} > ${WRKSRC}/src/filter${PRTYPE}.rev
|
||||
${WRKSRC}/src/filter${PRTYPE} \
|
||||
> ${WRKSRC}/src/filter${PRTYPE}.rev
|
||||
.endif
|
||||
${SED} -e 's,%%PRTYPE%%,${PRTYPE},g' \
|
||||
-e 's,%%PRT_MODEL%%,${PRT_MODEL},g' \
|
||||
@ -311,7 +329,7 @@ $${GSCONF} < $$TMP | $${PIPS} -ui C,' \
|
||||
-e 's,%%PREFIX%%,${PREFIX},g' \
|
||||
-e 's,%%WITH_EKPD%%,${WITH_EKPD},g' \
|
||||
${FILESDIR}/setup > ${WRKDIR}/setup.freebsd
|
||||
.if ${PORTVERSION} == 2.1.2 || ${PORTVERSION} == 2.6.2
|
||||
.if ${PIPS_MAJOR} >= 2
|
||||
${REINPLACE_CMD} -e 's,.rev$$,,' ${WRKDIR}/setup.freebsd
|
||||
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||
${FILESDIR}/ekpd.sh > ${WRKDIR}/ekpd.sh
|
||||
@ -335,7 +353,7 @@ post-install:
|
||||
${PREFIX}/libexec/pips/${PRT_MODEL}/scripts
|
||||
${INSTALL_DATA} ${FILESDIR}/ja.lc \
|
||||
${PREFIX}/libexec/pips/${PRT_MODEL}/scripts
|
||||
.if ${PORTVERSION} == 1.3.2
|
||||
.if ${PIPS_MAJOR} == 1
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/src/filter${PRTYPE}.rev \
|
||||
${PREFIX}/libexec/pips/${PRT_MODEL}
|
||||
.endif
|
||||
@ -358,7 +376,7 @@ post-install:
|
||||
.endfor
|
||||
@${ECHO_CMD} "@dirrm libexec/pips/${PRT_MODEL}" >>${TMPPLIST}
|
||||
@${ECHO_CMD} "@dirrm libexec/pips" >>${TMPPLIST}
|
||||
.if ${PORTVERSION} == 2.1.2 || ${PORTVERSION} == 2.6.2
|
||||
.if ${PIPS_MAJOR} >= 2
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/ekpd.sh ${PREFIX}/etc/rc.d
|
||||
.endif
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
Loading…
Reference in New Issue
Block a user