diff --git a/audio/gbsplay/Makefile b/audio/gbsplay/Makefile index 69f47f112a10..210f21c6e3af 100644 --- a/audio/gbsplay/Makefile +++ b/audio/gbsplay/Makefile @@ -2,92 +2,56 @@ # $FreeBSD$ PORTNAME= gbsplay -PORTVERSION= 0.0.93.20161217 -PORTREVISION= 6 +DISTVERSION= 0.0.93-130 +DISTVERSIONSUFFIX= -g6225989 +PORTEPOCH= 1 CATEGORIES= audio MAINTAINER= ehaupt@FreeBSD.org COMMENT= Emulates the sound hardware of the Nintendo Game Boy(TM) LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYRIGHT -USES= gmake compiler:c++11-lib -USE_GITHUB= yes -GH_ACCOUNT= mmitch -GH_TAGNAME= 2c4486e -HAS_CONFIGURE= yes +USES= compiler:c++11-lib desktop-file-utils gmake localbase:ldflags \ + shared-mime-info USE_CSTD= gnu89 -CONFIGURE_ARGS+= --prefix=${PREFIX} +USE_GITHUB= yes +GH_ACCOUNT= mmitch -CONFIGURE_ARGS+= --without-xmmsplugin +HAS_CONFIGURE= yes -MANPAGE1= gbsplay.1 gbsinfo.1 -MANPAGE5= gbsplayrc.5 -PORTDOCS= COPYRIGHT HISTORY README +CONFIGURE_ARGS+= --prefix=${PREFIX} --without-xmmsplugin \ + --sysconfdir=${PREFIX}/etc -OPTIONS_DEFINE= DOCS NAS NLS +MAKE_ENV+= EXAMPLESDIR="${STAGEDIR}${EXAMPLESDIR}" + +OPTIONS_DEFINE= BASH_COMPLETIONS DOCS EXAMPLES NAS NLS +OPTIONS_DEFAULT=BASH_COMPLETIONS OPTIONS_SUB= yes +BASH_COMPLETIONS_DESC= Install bash completions + NAS_LIB_DEPENDS= libaudio.so:audio/nas NAS_CONFIGURE_ENABLE= nas NLS_CONFIGURE_OFF= --disable-i18n NLS_USES= gettext -NLS_LDFLAGS= -L${LOCALBASE}/lib -lintl - -.include +NLS_LDFLAGS= -lintl post-patch: - @${REINPLACE_CMD} \ - -e 's|^\(default.*\)test|\1|' \ - -e 's#md5sum | cut -f1 -d..#md5 -q#' \ - ${WRKSRC}/${MAKEFILE} - @${REINPLACE_CMD} -e \ - '/^need_include\ /d; \ - 468s|char argc|int argc|; \ - s|/usr/local/include|${LOCALBASE}/include|; \ - s|/usr/local/lib|${LOCALBASE}/lib|; \ - s|/usr/X11R6/include||; \ - s|/usr/X11R6/lib||; \ - s|/usr/X11/lib|${LOCALBASE}/lib|; \ - s|/usr/lib/X11|${LOCALBASE}/lib/X11|; \ - s|-Os||; s|-pipe||; s|-fomit-frame-pointer||; \ - s|-march=$$ARCH||' \ - ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|/\(etc/gbsplayrc\)|${PREFIX}/\1|' \ - ${WRKSRC}/gbsplay.c \ - ${WRKSRC}/gbsplay.in.1 \ - ${WRKSRC}/gbsplayrc.in.5 - -do-install: -.for f in ${PORTNAME} gbsinfo - ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${STAGEDIR}${PREFIX}/bin -.endfor - -.for f in ${MANPAGE1} ${MANPAGE5} - ${INSTALL_MAN} ${WRKSRC}/${f} ${STAGEDIR}${MAN${f:E}PREFIX}/man/man${f:E} -.endfor - - @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} - ${INSTALL_DATA} ${WRKSRC}/examples/nightmode.gbs \ - ${STAGEDIR}${EXAMPLESDIR} + @${REINPLACE_CMD} -e "s|/etc/\(gbsplayrc\)|${PREFIX}/etc/\1|" \ + ${WRKSRC}/man/gbsplay.in.1 ${WRKSRC}/man/gbsplayrc.in.5 +post-install: ${INSTALL_DATA} ${WRKSRC}/examples/gbsplayrc_sample \ ${STAGEDIR}${PREFIX}/etc/gbsplayrc.sample -.if !exists(${STAGEDIR}${PREFIX}/etc/gbsplayrc) - ${INSTALL_DATA} ${WRKSRC}/examples/gbsplayrc_sample \ - ${STAGEDIR}${PREFIX}/etc/gbsplayrc -.endif + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gbsplay \ + ${STAGEDIR}${PREFIX}/bin/gbsinfo -.if ${PORT_OPTIONS:MNLS} -.for l in de en - ${INSTALL_DATA} ${WRKSRC}/po/${l}.mo \ - ${STAGEDIR}${PREFIX}/share/locale/${l}/LC_MESSAGES/gbsplay.mo -.endfor -.endif - @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for f in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR} -.endfor +post-install-BASH_COMPLETIONS-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d + ${INSTALL_DATA} ${WRKSRC}/contrib/gbsplay.bashcompletion \ + ${STAGEDIR}${PREFIX}/etc/bash_completion.d/${PORTNAME} .include diff --git a/audio/gbsplay/distinfo b/audio/gbsplay/distinfo index f6cd9f8db5b4..8b94a1e48339 100644 --- a/audio/gbsplay/distinfo +++ b/audio/gbsplay/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1486032638 -SHA256 (mmitch-gbsplay-0.0.93.20161217-2c4486e_GH0.tar.gz) = 07358b957397b565bbe66e3b515ff22b33f5eb1f8381f8ce7f9a29a6d729901d -SIZE (mmitch-gbsplay-0.0.93.20161217-2c4486e_GH0.tar.gz) = 126791 +TIMESTAMP = 1545989371 +SHA256 (mmitch-gbsplay-0.0.93-130-g6225989_GH0.tar.gz) = 00bc00bbec4a66edef6dfd71df4c0b55c28fa9b65cc614381ae258576fdd1622 +SIZE (mmitch-gbsplay-0.0.93-130-g6225989_GH0.tar.gz) = 129907 diff --git a/audio/gbsplay/files/patch-Makefile b/audio/gbsplay/files/patch-Makefile new file mode 100644 index 000000000000..2b29cbf9c6be --- /dev/null +++ b/audio/gbsplay/files/patch-Makefile @@ -0,0 +1,25 @@ +--- Makefile.orig 2018-12-25 13:50:45 UTC ++++ Makefile +@@ -71,7 +71,7 @@ xmmsdir := $(DESTDIR)$(XMMSPREFIX)$(XMMS_INPUT_PLU + man1dir := $(mandir)/man1 + man5dir := $(mandir)/man5 + contribdir := $(docdir)/contrib +-exampledir := $(docdir)/examples ++exampledir := $(EXAMPLESDIR) + + DISTDIR := gbsplay-$(VERSION) + +@@ -82,10 +82,10 @@ GBSPLAYLDFLAGS := + + export Q VERBOSE CC HOSTCC BUILDCC GBSCFLAGS GBSLDFLAGS + +-docs := README HISTORY COPYRIGHT ++docs := README + docs-dist := INSTALL CODINGSTYLE TESTSUITE gbsformat.txt +-contribs := contrib/gbs2ogg.sh contrib/gbsplay.bashcompletion +-examples := examples/nightmode.gbs examples/gbsplayrc_sample ++contribs := contrib/gbs2ogg.sh ++examples := examples/nightmode.gbs + + mans := man/gbsplay.1 man/gbsinfo.1 man/gbsplayrc.5 + mans_src := man/gbsplay.in.1 man/gbsinfo.in.1 man/gbsplayrc.in.5 diff --git a/audio/gbsplay/files/patch-configure b/audio/gbsplay/files/patch-configure new file mode 100644 index 000000000000..b7afe42d573a --- /dev/null +++ b/audio/gbsplay/files/patch-configure @@ -0,0 +1,33 @@ +--- configure.orig 2018-12-25 13:50:45 UTC ++++ configure +@@ -669,7 +669,6 @@ fi + + ## check for various headers + +-need_include inttypes.h + + if [ "$use_devdsp" != no ]; then + remember_use devdsp +@@ -729,11 +728,11 @@ fi + + if [ "$use_nas" != no ]; then + remember_use nas +- check_include audio/audiolib.h "/usr/X11R6/include" ++ check_include audio/audiolib.h "" + retval1=$? + retval2=1 + if [ $retval1 -eq 0 ]; then +- check_libs audio "X11 Xt m" "/usr/X11R6/lib /usr/X11/lib /usr/lib/X11" <