summaryrefslogtreecommitdiff
path: root/net-im/micq
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2001-03-23 19:39:30 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2001-03-23 19:39:30 +0000
commite1e50e779880257ced5fbff092db1932a10ca79c (patch)
treee011138c9c4f93b52d1005feeeac6e3bf8d64e59 /net-im/micq
parentMinor tweaks to Makefile and PLIST to clean up a few missed items (diff)
Add ability to build a localised version of the port.
Submitted by: "Alexandr A. Listopad" <laa@lucky.net> Extended & improved by: sobomax
Notes
Notes: svn path=/head/; revision=40284
Diffstat (limited to 'net-im/micq')
-rw-r--r--net-im/micq/Makefile34
-rw-r--r--net-im/micq/files/slangs17
2 files changed, 46 insertions, 5 deletions
diff --git a/net-im/micq/Makefile b/net-im/micq/Makefile
index 6ec760f71029..326d60c86623 100644
--- a/net-im/micq/Makefile
+++ b/net-im/micq/Makefile
@@ -7,6 +7,7 @@
PORTNAME= micq
PORTVERSION= 0.4.6.1
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://micq.ukeer.de/source/
DISTNAME= ${PORTNAME}-${PORTVERSION:S/1/p1/}
@@ -18,13 +19,36 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:S/.1/-p1/}/src
MAN1= micq.1
+SUP_LANGS= `${SED} 's|$$|,|' < ${FILESDIR}/slangs`
+
+pre-configure:
+.if !defined(WITH_MICQ_LANG)
+ @${ECHO_MSG} "If you want to compile ${PORTNAME} with your native"
+ @${ECHO_MSG} "language support:"
+ @${ECHO_MSG} "make WITH_MICQ_LANG=<your_lang>"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "Currently supported <your_lang> values are:"
+ @${ECHO} " "${SUP_LANGS} | /usr/bin/fmt
+.else
+ @${ECHO} "#define ${WITH_MICQ_LANG}_LANG" >> \
+ ${WRKSRC}/../include/config.h
+ @${ECHO_MSG} "Compiling ${PORTNAME} with ${WITH_MICQ_LANG}."
+.endif
+
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/micq ${PREFIX}/bin
- ${INSTALL_MAN} ${WRKSRC}/../micq.1 ${PREFIX}/man/man1
+ ${INSTALL_PROGRAM} ${WRKSRC}/micq ${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/../micq.1 ${PREFIX}/man/man1
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/doc/micq
- ${INSTALL_DATA} ${WRKSRC}/../README ${PREFIX}/share/doc/micq
- ${INSTALL_DATA} ${WRKSRC}/../CHANGELOG ${PREFIX}/share/doc/micq
+ ${MKDIR} ${PREFIX}/share/doc/micq
+ ${INSTALL_DATA} ${WRKSRC}/../README ${PREFIX}/share/doc/micq
+ ${INSTALL_DATA} ${WRKSRC}/../CHANGELOG ${PREFIX}/share/doc/micq
.endif
+# Administrative rule to automatically extract
+# names of supported langs
+update-slangs: patch
+ ${GREP} '#define .*_LANG' < ${WRKSRC}/../include/config.h | \
+ ${SED} 's|.*#define || ; s|_LANG.*||' | /usr/bin/sort | \
+ /usr/bin/uniq > ${FILESDIR}/slangs
+
.include <bsd.port.mk>
diff --git a/net-im/micq/files/slangs b/net-im/micq/files/slangs
new file mode 100644
index 000000000000..eb0513f76893
--- /dev/null
+++ b/net-im/micq/files/slangs
@@ -0,0 +1,17 @@
+BRAZIL
+BULGARIAN
+CHINESE
+CROATIAN
+DUTCH
+ENGLISH
+FINNISH
+FRENCH
+GERMAN
+INDONESIAN
+ITALIAN
+POLISH
+RUSSIAN
+SERBOCROATIAN
+SPANISH
+SWEDISH
+UKRAINIAN