aboutsummaryrefslogtreecommitdiffstats
path: root/net-im/climm
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2001-03-24 03:39:30 +0800
committersobomax <sobomax@FreeBSD.org>2001-03-24 03:39:30 +0800
commit21bd8672519bae0a885c6ea5a140c1afec18577d (patch)
treeff52d8c180ab22fad94f71f989344aca4a9058eb /net-im/climm
parent334f8057eed469d8f2d6e8a9fface30dd72955f1 (diff)
downloadfreebsd-ports-gnome-21bd8672519bae0a885c6ea5a140c1afec18577d.tar.gz
freebsd-ports-gnome-21bd8672519bae0a885c6ea5a140c1afec18577d.tar.zst
freebsd-ports-gnome-21bd8672519bae0a885c6ea5a140c1afec18577d.zip
Add ability to build a localised version of the port.
Submitted by: "Alexandr A. Listopad" <laa@lucky.net> Extended & improved by: sobomax
Diffstat (limited to 'net-im/climm')
-rw-r--r--net-im/climm/Makefile34
-rw-r--r--net-im/climm/files/slangs17
2 files changed, 46 insertions, 5 deletions
diff --git a/net-im/climm/Makefile b/net-im/climm/Makefile
index 6ec760f71029..326d60c86623 100644
--- a/net-im/climm/Makefile
+++ b/net-im/climm/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/climm/files/slangs b/net-im/climm/files/slangs
new file mode 100644
index 000000000000..eb0513f76893
--- /dev/null
+++ b/net-im/climm/files/slangs
@@ -0,0 +1,17 @@
+BRAZIL
+BULGARIAN
+CHINESE
+CROATIAN
+DUTCH
+ENGLISH
+FINNISH
+FRENCH
+GERMAN
+INDONESIAN
+ITALIAN
+POLISH
+RUSSIAN
+SERBOCROATIAN
+SPANISH
+SWEDISH
+UKRAINIAN