- Fix build on i386

- Enable sound support for all ARCH

PR:		187494
Submitted by:	ports fury
This commit is contained in:
Martin Wilke 2014-04-29 06:01:16 +00:00
parent 899348a9c9
commit 66d4f99bd0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=352578
4 changed files with 25 additions and 47 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= emiclock
PORTVERSION= 2.0.2
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= x11-clocks
MASTER_SITES= http://ftp.vector.co.jp/pack/unix/personal/tokei/
@ -13,28 +13,31 @@ COMMENT= Hyper-animated face analog clock for X11
USES= imake
USE_XORG= ice sm x11 xaw xext xmu xpm xt
OPTIONS_DEFINE= DOCS
LANGRES= resources/R6/EUC/EmiClock.ad
LANGDIR= ${LOCALBASE}/lib/X11/ja_JP.eucJP/app-defaults
LANGDIR2= ${LOCALBASE}/lib/X11/ja_JP.EUC/app-defaults
EMICLOCKDIR= ${LOCALBASE}/lib/X11/EmiClock
LANGDIR= ${PREFIX}/lib/X11/ja_JP.eucJP/app-defaults
LANGDIR2= ${PREFIX}/lib/X11/ja_JP.EUC/app-defaults
PORTDOCS= COPYRIGHT COPYRIGHT.en
.include <bsd.port.options.mk>
.if ${ARCH} != "i386"
PLIST_SUB= SOUND="@comment "
.else
PLIST_SUB= SOUND=""
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|^#if defined.*\(FreeBSDArchitecture\).*|#ifdef \1| ; \
/MakeDir/s|EmiClockLib|$$(DESTDIR)&| ; \
/INSTALL/s|EmiClockLib|$$(DESTDIR)&|' ${WRKSRC}/Imakefile
@${REINPLACE_CMD} -e \
'/USE_SOUND/s|#undef|#define|' ${WRKSRC}/config.h
@${REINPLACE_CMD} -e \
'/soundcard.h/s|machine|sys|' ${WRKSRC}/include/sound.h
post-install:
@${MKDIR} ${STAGEDIR}${EMICLOCKDIR}
@${MKDIR} ${STAGEDIR}${LANGDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} ${LANGRES} \
${STAGEDIR}${LANGDIR}/EmiClock)
@${MKDIR} ${STAGEDIR}${LANGDIR2}
cd ${WRKSRC} && ${INSTALL_DATA} ${LANGRES} ${STAGEDIR}${LANGDIR}/EmiClock
cd ${WRKSRC} && ${INSTALL_DATA} ${LANGRES} ${STAGEDIR}${LANGDIR2}/EmiClock
${LN} -sf ../../ja_JP.eucJP/app-defaults/EmiClock \
${STAGEDIR}${LANGDIR2}/EmiClock
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}; ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
(cd ${WRKSRC} && ${INSTALL_DATA} COPYRIGHT COPYRIGHT.en \
${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>

View File

@ -1,14 +0,0 @@
--- config.h- Thu Sep 2 23:33:48 1999
+++ config.h Thu Sep 30 11:23:50 1999
@@ -51,7 +51,11 @@
* $B%5%&%s%I4X78$N@_Dj(B
*/
+#ifdef __i386__
+#define USE_SOUND /* $B%5%&%s%I$r;H$&!)(B */
+#else
#undef USE_SOUND /* $B%5%&%s%I$r;H$&!)(B */
+#endif
/* #define EmiClockLib /usr/local/lib/X11/EmiClock */
/* $(LIBDIR)/EmiClock $B0J30$N>l=j$K%5%&%s%I%U%!%$%k$r%$%s%9%H!<%k(B */

View File

@ -1,14 +0,0 @@
--- include/sound.h.old Thu Sep 2 23:34:10 1999
+++ include/sound.h Thu Apr 11 08:32:05 2002
@@ -222,7 +222,11 @@
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
+#if __FreeBSD__ > 3
+#include <sys/soundcard.h>
+#else
#include <machine/soundcard.h>
+#endif
#undef O_RDWR
#define O_RDWR O_WRONLY /* audio $B%G%P%$%9$OF1;~%*!<%W%s$G$-$J$$!)(B */

View File

@ -1,11 +1,14 @@
bin/emiclock
%%SOUND%%lib/X11/EmiClock/myu.au
lib/X11/EmiClock/myu.au
lib/X11/app-defaults/EmiClock
lib/X11/ja_JP.EUC/app-defaults/EmiClock
lib/X11/ja_JP.eucJP/app-defaults/EmiClock
man/man1/emiclock.1.gz
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.en
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrmtry lib/X11/ja_JP.eucJP/app-defaults
@dirrmtry lib/X11/ja_JP.eucJP
@dirrmtry lib/X11/ja_JP.EUC/app-defaults
@dirrmtry lib/X11/ja_JP.EUC
@dirrmtry lib/X11/EmiClock
@dirrm lib/X11/EmiClock