diff --git a/x11-clocks/emiclock/Makefile b/x11-clocks/emiclock/Makefile index 719055d25d1b..c17378e0bf44 100644 --- a/x11-clocks/emiclock/Makefile +++ b/x11-clocks/emiclock/Makefile @@ -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 - -.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 diff --git a/x11-clocks/emiclock/files/patch-aa b/x11-clocks/emiclock/files/patch-aa deleted file mode 100644 index 0947daa7af39..000000000000 --- a/x11-clocks/emiclock/files/patch-aa +++ /dev/null @@ -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 @@ - * サウンド関係の設定 - */ - -+#ifdef __i386__ -+#define USE_SOUND /* サウンドを使う? */ -+#else - #undef USE_SOUND /* サウンドを使う? */ -+#endif - - /* #define EmiClockLib /usr/local/lib/X11/EmiClock */ - /* $(LIBDIR)/EmiClock 以外の場所にサウンドファイルをインストール */ diff --git a/x11-clocks/emiclock/files/patch-include::sound.h b/x11-clocks/emiclock/files/patch-include::sound.h deleted file mode 100644 index f62cdabf221a..000000000000 --- a/x11-clocks/emiclock/files/patch-include::sound.h +++ /dev/null @@ -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 - #include - #include -+#if __FreeBSD__ > 3 -+#include -+#else - #include -+#endif - - #undef O_RDWR - #define O_RDWR O_WRONLY /* audio デバイスは同時オープンできない? */ diff --git a/x11-clocks/emiclock/pkg-plist b/x11-clocks/emiclock/pkg-plist index c039dae4f081..3a98d9cbc524 100644 --- a/x11-clocks/emiclock/pkg-plist +++ b/x11-clocks/emiclock/pkg-plist @@ -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