1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-18 00:10:04 +00:00

www/badwolf: Fix build without NLS

- Upstream use configure/ninja and stopped using make for builds.
  Patch configure to have a NLS knob working

PR:		274102
Approved by:	portmgr (build fix blanket)
This commit is contained in:
Nuno Teixeira 2023-10-01 14:20:45 +01:00
parent cd01a25f03
commit 79977efe22
4 changed files with 69 additions and 50 deletions

View File

@ -1,5 +1,6 @@
PORTNAME= badwolf
DISTVERSION= 1.3.0
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= https://hacktivis.me/releases/
@ -35,7 +36,7 @@ LIBSOUP_LIB_DEPENDS= libsoup-2.4.so:devel/libsoup
LIBSOUP_CONFIGURE_ENV= WITH_URI_PARSER=libsoup2
NLS_USES= gettext
NLS_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-Makefile
NLS_EXTRA_PATCHES_OFF= ${PATCHDIR}/extra-patch-configure
GURI_USE_GNOME= glib20
LIBAV_USE_GSTREAMER= libav

View File

@ -1,40 +0,0 @@
--- Makefile.orig 2021-11-20 12:28:32 UTC
+++ Makefile
@@ -10,10 +10,10 @@ EXE_test = uri_test
OBJS_test = uri_test.o
EXE = badwolf
EXE_test = uri_test
-TRANS = fr.mo pt_BR.mo tr.mo de.mo vi.mo
+#TRANS = fr.mo pt_BR.mo tr.mo de.mo vi.mo
DOCS = usr.bin.badwolf README.md KnowledgeBase.md interface.txt
-all: config.mk $(EXE) $(TRANS) po/messages.pot
+all: config.mk $(EXE)
config.mk: configure
@echo "Error: You need to execute ./configure before running make"
@@ -35,9 +35,9 @@ po/%.po: po/messages.pot
po/%.po: po/messages.pot
msgmerge --update --backup=off $@ $<
-${TRANS}: po/${@:.mo=.po}
- mkdir -p locale/${@:.mo=}/LC_MESSAGES
- $(MSGFMT) -o locale/${@:.mo=}/LC_MESSAGES/$(PACKAGE).mo po/${@:.mo=.po}
+#${TRANS}: po/${@:.mo=.po}
+# mkdir -p locale/${@:.mo=}/LC_MESSAGES
+# $(MSGFMT) -o locale/${@:.mo=}/LC_MESSAGES/$(PACKAGE).mo po/${@:.mo=.po}
badwolf: $(OBJS)
$(CC) -std=c11 -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
@@ -62,9 +62,8 @@ install: all
cp -p badwolf $(DESTDIR)$(BINDIR)/
mkdir -p $(DESTDIR)$(MANDIR)/man1
cp -p badwolf.1 $(DESTDIR)$(MANDIR)/man1/
- mkdir -p $(DESTDIR)$(DATADIR)/locale
- cp -r locale/ $(DESTDIR)$(DATADIR)/
- cp interface.css $(DESTDIR)$(DATADIR)/
+ mkdir -p $(DESTDIR)$(DATADIR)
+ cp -p interface.css $(DESTDIR)$(DATADIR)/
mkdir -p $(DESTDIR)$(APPSDIR)
cp -p badwolf.desktop $(DESTDIR)$(APPSDIR)/
mkdir -p $(DESTDIR)$(DOCDIR)

View File

@ -0,0 +1,58 @@
--- configure.orig 2023-10-01 13:05:07 UTC
+++ configure
@@ -13,8 +13,8 @@ DOCS="usr.bin.badwolf README.md KnowledgeBase.md inter
EXE_test="fmt_test uri_test bookmarks_test"
DOCS="usr.bin.badwolf README.md KnowledgeBase.md interface.md"
-TRANS="fr pt_BR tr de vi"
-TRANS_MAN="de fr tr vi"
+#TRANS="fr pt_BR tr de vi"
+#TRANS_MAN="de fr tr vi"
lint_targets=""
@@ -373,18 +373,18 @@ done >>config.ninja
echo
done >>config.ninja
-for trans in ${TRANS}; do
- echo "build po/${trans}.po: msgmerge po/messages.pot"
- echo "build locale/${trans}/LC_MESSAGES/Badwolf.mo: po2mo po/${trans}.po"
- all="${all} locale/${trans}/LC_MESSAGES/Badwolf.mo"
-done >>config.ninja
+#for trans in ${TRANS}; do
+# echo "build po/${trans}.po: msgmerge po/messages.pot"
+# echo "build locale/${trans}/LC_MESSAGES/Badwolf.mo: po2mo po/${trans}.po"
+# all="${all} locale/${trans}/LC_MESSAGES/Badwolf.mo"
+#done >>config.ninja
-for man in ${TRANS_MAN}; do
- echo "build po/${man}_man.po: xgettext_man badwolf.1"
- echo "build badwolf.${man}.1: translate_manpage po/${man}_man.po"
- bundled="${bundled} badwolf.${man}.1"
- trans_man="${trans_man} badwolf.${man}.1"
-done >>config.ninja
+#for man in ${TRANS_MAN}; do
+# echo "build po/${man}_man.po: xgettext_man badwolf.1"
+# echo "build badwolf.${man}.1: translate_manpage po/${man}_man.po"
+# bundled="${bundled} badwolf.${man}.1"
+# trans_man="${trans_man} badwolf.${man}.1"
+#done >>config.ninja
for i in 24 32 48 64 128 256; do
echo "build icons/hicolor/${i}x${i}/apps/badwolf.png: gen_icon icons/hicolor/scalable/apps/badwolf.svg
@@ -438,10 +438,10 @@ doins "${MANDIR}/man1" ./badwolf.1
doins "${BINDIR}" ./badwolf
doins "${MANDIR}/man1" ./badwolf.1
-for man in ${TRANS_MAN}; do
- newins "${MANDIR}/\${man}/man1" "./badwolf.\${man}.1" "badwolf.1"
-done
-doins "${DATADIR}" ./locale
+#for man in ${TRANS_MAN}; do
+# newins "${MANDIR}/\${man}/man1" "./badwolf.\${man}.1" "badwolf.1"
+#done
+#doins "${DATADIR}" ./locale
doins "${DATADIR}" ./interface.css
doins "${APPSDIR}" badwolf.desktop
doins "${DOCDIR}" ${DOCS}

View File

@ -10,12 +10,12 @@ share/icons/hicolor/64x64/apps/badwolf.png
share/icons/hicolor/scalable/apps/badwolf.svg
share/man/man1/badwolf.1.gz
%%NLS%%@dir %%DATADIR%%/locale
%%DATADIR%%/locale/de/LC_MESSAGES/Badwolf.mo
%%DATADIR%%/locale/fr/LC_MESSAGES/Badwolf.mo
%%DATADIR%%/locale/pt_BR/LC_MESSAGES/Badwolf.mo
%%DATADIR%%/locale/tr/LC_MESSAGES/Badwolf.mo
%%DATADIR%%/locale/vi/LC_MESSAGES/Badwolf.mo
share/man/de/man1/badwolf.1.gz
share/man/fr/man1/badwolf.1.gz
share/man/tr/man1/badwolf.1.gz
share/man/vi/man1/badwolf.1.gz
%%NLS%%%%DATADIR%%/locale/de/LC_MESSAGES/Badwolf.mo
%%NLS%%%%DATADIR%%/locale/fr/LC_MESSAGES/Badwolf.mo
%%NLS%%%%DATADIR%%/locale/pt_BR/LC_MESSAGES/Badwolf.mo
%%NLS%%%%DATADIR%%/locale/tr/LC_MESSAGES/Badwolf.mo
%%NLS%%%%DATADIR%%/locale/vi/LC_MESSAGES/Badwolf.mo
%%NLS%%share/man/de/man1/badwolf.1.gz
%%NLS%%share/man/fr/man1/badwolf.1.gz
%%NLS%%share/man/tr/man1/badwolf.1.gz
%%NLS%%share/man/vi/man1/badwolf.1.gz