summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/lame/Makefile23
-rw-r--r--audio/lame/pkg-plist1
2 files changed, 22 insertions, 2 deletions
diff --git a/audio/lame/Makefile b/audio/lame/Makefile
index c5c52129c27a..6a6afed33786 100644
--- a/audio/lame/Makefile
+++ b/audio/lame/Makefile
@@ -18,9 +18,28 @@ BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
GNU_CONFIGURE= yes
INSTALLS_SHLIB= yes
-USE_GTK= yes
+WANT_GTK= yes
CONFIGURE_ARGS= --enable-nasm
+.include <bsd.port.pre.mk>
+
+.if (defined(HAVE_GTK) || defined(WITH_GTK)) && !defined(WITHOUT_GTK)
+USE_GTK= yes
+PLIST_SUB+= WITH_GTK=''
+.else
+PLIST_SUB+= WITH_GTK='@comment '
+.endif
+
MAN1= lame.1
-.include <bsd.port.mk>
+post-build:
+.if defined(HAVE_GTK) && !defined(WITHOUT_GTK)
+ (cd ${WRKSRC}/frontend && make mp3x)
+.endif
+
+post-install:
+.if defined(HAVE_GTK) && !defined(WITHOUT_GTK)
+ ${INSTALL_PROGRAM} ${WRKSRC}/frontend/mp3x ${PREFIX}/bin/
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/audio/lame/pkg-plist b/audio/lame/pkg-plist
index f828c3f25139..a2bdffc2c602 100644
--- a/audio/lame/pkg-plist
+++ b/audio/lame/pkg-plist
@@ -1,4 +1,5 @@
bin/lame
+%%WITH_GTK%%bin/mp3x
include/lame/lame.h
lib/libmp3lame.a
lib/libmp3lame.la