Changeset View
Standalone View
deskutils/fbreader/Makefile
# Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org> | # Created by: Andrew Pantyukhin <infofarmer@FreeBSD.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= fbreader | PORTNAME= fbreader | ||||
PORTVERSION= 0.99.4 | PORTVERSION= 0.99.6 | ||||
DISTVERSIONPREFIX= sources- | |||||
PORTREVISION= 2 | |||||
CATEGORIES= deskutils | CATEGORIES= deskutils | ||||
MASTER_SITES= http://www.fbreader.org/files/desktop/ \ | |||||
http://old.fbreader.org/ | |||||
MAINTAINER= fluffy@FreeBSD.org | MAINTAINER= fluffy@FreeBSD.org | ||||
COMMENT= Powerful e-book reader | COMMENT= Powerful e-book reader | ||||
LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \ | LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \ | ||||
libexpat.so:${PORTSDIR}/textproc/expat2 \ | libexpat.so:${PORTSDIR}/textproc/expat2 \ | ||||
libfribidi.so:${PORTSDIR}/converters/fribidi \ | libfribidi.so:${PORTSDIR}/converters/fribidi \ | ||||
libunibreak.so:${PORTSDIR}/textproc/libunibreak | libunibreak.so:${PORTSDIR}/textproc/libunibreak | ||||
.if defined(WITH_GTK2) | OPTIONS_SINGLE= GUI | ||||
UI= gtk | OPTIONS_SINGLE_GUI= GTK2 QT4 | ||||
USE_GNOME= gtk20 | OPTIONS_DEFAULT= QT4 | ||||
.else | OPTIONS_SUB= yes | ||||
UI= qt4 | |||||
USE_QT4= gui corelib imageformats network moc_build | |||||
LDFLAGS+= -L${QT_LIBDIR} | |||||
.endif | |||||
USE_GITHUB= yes | |||||
GH_ACCOUNT= geometer | |||||
GH_PROJECT= FBReader | |||||
GH_COMMIT= 7abc80d | |||||
GH_TAGNAME= ${PORTVERSION}-freebsdport | |||||
koobs: Probably better names "GUI" ?
What do other ports use?
Also, you can give a group option a… | |||||
Not Done Inline ActionsUnnecessary, as this is only used by the ports framework... xmj: Unnecessary, as this is only used by the ports framework... | |||||
Not Done Inline ActionsI don't understand what 'unnecessary' means in this context. Please clarify. One interpretation is that it's only valuable for ports (and not packages). If this is the case, it still has user value. If not, again please clarify .. When option FOO is a group (single, multi, radio, etc), the group title shows up as the value of OPT_DESC in the dialog koobs: I don't understand what 'unnecessary' means in this context. Please clarify.
One… | |||||
Not Done Inline ActionsActually, by making it "GUI" i can just use the _DESC from bsd.options.desc.mk :-) xmj: Actually, by making it "GUI" i can just use the _DESC from bsd.options.desc.mk :-) | |||||
.if defined(WITH_DEBUG) | .if defined(WITH_DEBUG) | ||||
STATUS= debug | STATUS= debug | ||||
.else | .else | ||||
STATUS= release | STATUS= release | ||||
.endif | .endif | ||||
USES= iconv gmake pkgconfig tar:tgz | USES= compiler iconv gmake pkgconfig tar:tgz | ||||
Not Done Inline ActionsSort these koobs: Sort these | |||||
USE_SQLITE= yes | |||||
USE_LDCONFIG= yes | USE_LDCONFIG= yes | ||||
USE_SQLITE= yes | |||||
GTK2_USE= gnome=gtk20 | |||||
GTK2_MAKE_ENV= UI_TYPE=gtk | |||||
QT4_USE= qt4=gui,corelib,imageformats,network,moc_build | |||||
QT4_LDFLAGS= -L${QT_LIBDIR} | |||||
QT4_MAKE_ENV= UI_TYPE=qt4 | |||||
Not Done Inline ActionsGroup USE_* options and sort by alpha koobs: Group USE_* options and sort by alpha | |||||
INSTALL_TARGET= do_install | INSTALL_TARGET= do_install | ||||
Not Done Inline ActionsI think you want GTK2_USE= GNOME=gtk20 ? koobs: I think you want GTK2_USE= GNOME=gtk20 ? | |||||
PLIST_SUB= UI=${UI} | |||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} | |||||
CFLAGS+= -I${LOCALBASE}/include | CFLAGS+= -I${LOCALBASE}/include | ||||
LDFLAGS+= -L${LOCALBASE}/lib | LDFLAGS+= -L${LOCALBASE}/lib | ||||
Not Done Inline ActionsFix case: QT4_USE= QT4= koobs: Fix case: QT4_USE= QT4=
| |||||
Not Done Inline ActionsIs this necessary? (See next comment) koobs: Is this necessary? (See next comment) | |||||
Not Done Inline Actionsdoesn't build otherwise. xmj: doesn't build otherwise. | |||||
Not Done Inline ActionsUpcasing is done in bsd.options.mk regardless; convention has it to use lower-case values. See chapter 5.12.3.2. OPT_USE of Porter's Handbook xmj: Upcasing is done in bsd.options.mk regardless; convention has it to use lower-case values. See… | |||||
MAKE_ENV+= TARGET_ARCH=desktop UI_TYPE=${UI} TARGET_STATUS=${STATUS} \ | MAKE_ENV+= TARGET_ARCH=desktop TARGET_STATUS=${STATUS} \ | ||||
Not Done Inline ActionsIs this better scoped as QT4_LIBS ? koobs: Is this better scoped as QT4_LIBS ? | |||||
Not Done Inline ActionsNope xmj: Nope | |||||
Not Done Inline ActionsPlease clarify .. koobs: Please clarify .. | |||||
Not Done Inline Actionshow would you want me to do some LIBS variable ? xmj: how would you want me to do some LIBS variable ? | |||||
Not Done Inline ActionsOPT_LIBS is now supported by options helpers, but the question was whether it would be *better* scoped in LIBS, rather than LDFLAGS, which goes to ordering of flags among other things. koobs: OPT_LIBS is now supported by options helpers, but the question was whether it would be *better*… | |||||
ROOTDIR=${WRKSRC} INSTALLDIR=${PREFIX} LIBDIR=${PREFIX}/lib \ | ROOTDIR=${WRKSRC} INSTALLDIR=${PREFIX} LIBDIR=${PREFIX}/lib \ | ||||
Not Done Inline ActionsIs LIBDIR=${PREFIX}/lib needed if LDFLAGS is set and vice-versa? koobs: Is LIBDIR=${PREFIX}/lib needed if LDFLAGS is set and vice-versa? | |||||
Not Done Inline ActionsYes, so that it can be propagated to the real/gmake. xmj: Yes, so that it can be propagated to the real/gmake. | |||||
LD="${CXX}" | LD="${CXX}" | ||||
MAKE_ARGS+= MAKE=${MAKE_CMD} LIBDIR=${PREFIX}/lib | MAKE_ARGS+= MAKE=${MAKE_CMD} LIBDIR=${PREFIX}/lib | ||||
Not Done Inline ActionsIs LIBDIR=${PREFIX}/lib needed if LDFLAGS is set and vice-versa? koobs: Is LIBDIR=${PREFIX}/lib needed if LDFLAGS is set and vice-versa? | |||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e '/^CFLAGS/s,-pipe.*$$,${CFLAGS} -DDO_ICONV_CAST -DLIBICONV_PLUG,' \ | @${REINPLACE_CMD} -e '/^CFLAGS/s,-pipe.*$$,${CFLAGS} -DDO_ICONV_CAST -DLIBICONV_PLUG,' \ | ||||
-e '/^CC/d;/^LD/d;/QTINCLUDE/s,-I.*$$,-I${QT_INCDIR},' \ | -e '/^CC/d;/^LD/d;/QTINCLUDE/s,-I.*$$,-I${QT_INCDIR},' \ | ||||
${WRKSRC}/makefiles/arch/desktop.mk | ${WRKSRC}/makefiles/arch/desktop.mk | ||||
@${REINPLACE_CMD} -e 's,-O3,,;s,-ldl,${ICONV_LIB},' \ | @${REINPLACE_CMD} -e 's,-O3,,;s,-ldl,${ICONV_LIB},' \ | ||||
${WRKSRC}/makefiles/config.mk ${WRKSRC}/zlibrary/core/Makefile | ${WRKSRC}/makefiles/config.mk ${WRKSRC}/zlibrary/core/Makefile | ||||
@${REINPLACE_CMD} -e 's/-llinebreak/-lunibreak/g' ${WRKSRC}/zlibrary/text/Makefile | |||||
@${REINPLACE_CMD} -e 's/-llinebreak/-lunibreak/g' ${WRKSRC}/makefiles/*.mk | |||||
@${REINPLACE_CMD} -e 's,/usr,${PREFIX},' ${WRKSRC}/fbreader/desktop/Makefile | @${REINPLACE_CMD} -e 's,/usr,${PREFIX},' ${WRKSRC}/fbreader/desktop/Makefile | ||||
@${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} \ | @${FIND} ${WRKSRC} -name Makefile | ${XARGS} ${REINPLACE_CMD} \ | ||||
-e 's,make ,gmake ,' | -e 's,make ,gmake ,' | ||||
Not Done Inline ActionsIs this needed since we set MAKE_ARGS+= MAKE=${MAKE_CMD} or vice-versa? koobs: Is this needed since we set MAKE_ARGS+= MAKE=${MAKE_CMD} or vice-versa? | |||||
Not Done Inline ActionsYes, the call isn't to '${MAKE}' but to 'make'. xmj: Yes, the call isn't to '${MAKE}' but to 'make'. | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
Probably better names "GUI" ?
What do other ports use?
Also, you can give a group option a short title with GUI_DESC="Frontend GUI" or similar