- Replace KDE4 sharedmime with USES=shared-mime-info

- Add stage support
- Use options helpers
- Patch sources to install man pages to standard place and remove post-install
- Add kde to CATEGORIES
- Amend COMMENT
This commit is contained in:
Max Brazhnikov 2014-02-01 12:16:36 +00:00
parent ba04f34e7e
commit 52636e0979
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=342127
2 changed files with 16 additions and 32 deletions

View file

@ -3,54 +3,35 @@
PORTNAME= piklab PORTNAME= piklab
PORTVERSION= 0.16.2 PORTVERSION= 0.16.2
CATEGORIES= devel CATEGORIES= devel kde
MASTER_SITES= SF MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org MAINTAINER= ports@FreeBSD.org
COMMENT= KDE IDE for microcontroller development COMMENT= KDE/Qt IDE for microcontroller development
LICENSE= GPLv2 # (or later) LICENSE= GPLv2 # (or later)
OPTIONS_DEFINE= KDE4
OPTIONS_DEFAULT=KDE4
USE_BZIP2= yes USE_BZIP2= yes
DOS2UNIX_FILES= cmake/Piklab.cmake DOS2UNIX_FILES= cmake/Piklab.cmake
USE_QT4= corelib gui qt3support qtestlib xml \ USE_QT4= corelib gui qt3support qtestlib xml \
moc_build qmake_build rcc_build uic_build moc_build qmake_build rcc_build uic_build
USES= cmake gettext readline dos2unix USES= cmake gettext readline dos2unix
MAN1= piklab-hex.1 piklab-prog.1 OPTIONS_DEFINE= KDE4
OPTIONS_DEFAULT= KDE4
OPTIONS_SUB= yes
NO_STAGE= yes KDE4_USES= shared-mime-info
.include <bsd.port.options.mk> KDE4_USE= KDE4=automoc4,kdehier,kdelibs,kdeprefix
KDE4_CMAKE_OFF= -DQT_ONLY:BOOL=ON \
.if ${PORT_OPTIONS:MKDE4}
USE_KDE4= automoc4 kdehier kdelibs kdeprefix sharedmime
INSTALLS_ICONS= yes
MAN1+= piklab.1x
PLIST_SUB+= KDE4=""
.else
CMAKE_ARGS+= -DQT_ONLY:BOOL=ON \
-DLOCALE_INSTALL_DIR:STRING="${PREFIX}/share/locale" -DLOCALE_INSTALL_DIR:STRING="${PREFIX}/share/locale"
PLIST_SUB+= KDE4="@comment "
.endif
.include <bsd.port.pre.mk> BROKEN_sparc64= does not compile on sparc64
.if ${ARCH} == "sparc64"
BROKEN= Does not compile on sparc64
.endif
post-patch: post-patch:
@${REINPLACE_CMD} -e \ @${REINPLACE_CMD} -e \
'/man/s|^|#| ; \ '/install/s|^|#|' ${WRKSRC}/CMakeLists.txt
/install/s|^|#|' ${WRKSRC}/CMakeLists.txt @${REINPLACE_CMD} -e \
's,share/man,man,' ${WRKSRC}/man/CMakeLists.txt
post-install: .include <bsd.port.mk>
${INSTALL_MAN} ${WRKSRC}/man/piklab-*.1 ${MANPREFIX}/man/man1
.if ${PORT_OPTIONS:MKDE4}
${INSTALL_MAN} ${WRKSRC}/man/piklab.1x ${MANPREFIX}/man/man1
.endif
.include <bsd.port.post.mk>

View file

@ -2,6 +2,9 @@
bin/piklab-coff bin/piklab-coff
bin/piklab-hex bin/piklab-hex
bin/piklab-prog bin/piklab-prog
%%KDE4%%man/man1/piklab.1x.gz
man/man1/piklab-hex.1.gz
man/man1/piklab-prog.1.gz
%%KDE4%%share/applications/kde4/piklab.desktop %%KDE4%%share/applications/kde4/piklab.desktop
%%KDE4%%share/apps/katepart/syntax/asm-pic.xml %%KDE4%%share/apps/katepart/syntax/asm-pic.xml
%%KDE4%%share/apps/katepart/syntax/coff-c-pic.xml %%KDE4%%share/apps/katepart/syntax/coff-c-pic.xml