Friday, July 31, 2020

Re: update games/jag 0.3.7

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/jag/Makefile,v
retrieving revision 1.11
diff -u -p -u -p -r1.11 Makefile
--- Makefile 20 Mar 2020 16:44:23 -0000 1.11
+++ Makefile 7 Jul 2020 02:33:34 -0000
@@ -1,35 +1,42 @@
-# $OpenBSD: Makefile,v 1.11 2020/03/20 16:44:23 naddy Exp $
+# $OpenBSD: Makefile,v 1.11 2020/03/20 16:44:23 naddy Exp $
COMMENT = arcade-puzzle game
-V = 0.3.2
+V = 0.3.7
DISTNAME = jag-${V}
CATEGORIES = games
-HOMEPAGE = http://jag.xlabsoft.com
-REVISION = 2
+HOMEPAGE = https://gitlab.com/coringao/jag

# GPLv3
-PERMIT_PACKAGE = Yes
+# https://gitlab.com/coringao/jag/-/issues/1
+PERMIT_PACKAGE = restrictively licensed themes
+PERMIT_DISTFILES = restrictively licensed themes

-WANTLIB += GL ICE QtGui QtOpenGL QtXml SDL SDL_mixer SM X11 Xext
-WANTLIB += Xi Xinerama Xrandr Xrender c fontconfig freetype m
-WANTLIB += pthread ${COMPILER_LIBCXX}
+WANTLIB += ${COMPILER_LIBCXX} Qt5Core Qt5Gui Qt5OpenGL Qt5Widgets
+WANTLIB += Qt5X11Extras SDL2 SDL2_mixer X11 Xrandr c

COMPILER = base-clang ports-gcc base-gcc

-MASTER_SITES = http://jag.xlabsoft.com/files/
-DISTFILES
= jag-${V}-src.zip jag-${V}-data.zip
+MASTER_SITES = https://gitlab.com/coringao/jag/-/archive/${V}/

-MODULES = devel/qmake x11/qt4
-BUILD_DEPENDS = archivers/unzip
-LIB_DEPENDS = devel/sdl \
- devel/sdl-mixer
-WRKDIST = ${WRKDIR}/jag-${V}-src
+MODULES = devel/qmake x11/qt5
+LIB_DEPENDS = devel/sdl2 \
+ devel/sdl2-mixer \
+ x11/qt5/qtx11extras
+# make jag and jag-editor
+MODQMAKE_PROJECTS = . \
+ src/editor
+
+# delete DOS line endings
+post-extract:
+ @find ${WRKSRC} -type f \( -name "*.cpp" -o -name "*.h" \) -exec \
+ perl -i -pe 's/\r$$//' {} +

pre-configure:
- @${SUBST_CMD} ${WRKSRC}/Game.pro ${WRKSRC}/main.cpp
+ @${SUBST_CMD} ${WRKSRC}/game.pro ${WRKSRC}/src/main.cpp \
+ ${WRKSRC}/src/editor/jag-editor.pro

post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/jag
- cd ${WRKDIR}/jag-${V}-data/data && pax -rw . ${PREFIX}/share/jag
+ cd ${WRKSRC}/data && pax -rw . ${PREFIX}/share/jag
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/
find ${PREFIX}/share -type d -exec chmod ${DIRMODE} {} + -o \
-type f -exec chmod ${SHAREMODE} {} +
Index: distinfo
===================================================================
RCS file: /cvs/ports/games/jag/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 distinfo
--- distinfo 27 Jan 2013 23:54:51 -0000 1.1.1.1
+++ distinfo 7 Jul 2020 02:33:34 -0000
@@ -1,4 +1,2 @@
-SHA256 (jag-0.3.2-data.zip) = 0zG4sewgBo3g8113R7Pk60Vn9QVWjD2GIYhNLKRrbSI=
-SHA256 (jag-0.3.2-src.zip) = Cx/EY3PXtwvdNZypPlU7wkSklyH6GhjVIlxeiHtUykQ=
-SIZE (jag-0.3.2-data.zip) = 6237911
-SIZE (jag-0.3.2-src.zip) = 995053
+SHA256 (jag-0.3.7.tar.gz) = jI+SYKL476N4ojzhUdWjoEDklJ+EFBClnRDUzeJH9t4=
+SIZE (jag-0.3.7.tar.gz) = 6971529
Index: patches/patch-Game_pro
===================================================================
RCS file: patches/patch-Game_pro
diff -N patches/patch-Game_pro
--- patches/patch-Game_pro 27 Jan 2013 23:54:51 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-Game_pro,v 1.1.1.1 2013/01/27 23:54:51 stsp Exp $
---- Game.pro.orig Wed Jan 9 02:41:03 2013
-+++ Game.pro Wed Jan 9 02:41:45 2013
-@@ -5,9 +5,9 @@ QT += xml \
- opengl
- unix: {
- TARGET = ./bin/jag
-- target.path = /usr/local/bin/
-+ target.path = ${PREFIX}/bin/
- INSTALLS += target
-- datas.path = /usr/local/games/jag
-+ datas.path = ${PREFIX}/share/jag
- datas.files = data
- INSTALLS += datas
- LIBS += -lXrandr
Index: patches/patch-displaywrapper_cpp
===================================================================
RCS file: patches/patch-displaywrapper_cpp
diff -N patches/patch-displaywrapper_cpp
--- patches/patch-displaywrapper_cpp 24 Apr 2016 11:07:55 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-displaywrapper_cpp,v 1.1 2016/04/24 11:07:55 zhuk Exp $
---- displaywrapper.cpp.orig Sun Apr 24 13:55:59 2016
-+++ displaywrapper.cpp Sun Apr 24 13:56:19 2016
-@@ -280,8 +280,6 @@ void DisplayWrapper::dw_init(bool filter, int minWidth
- //short original_rate = XRRConfigCurrentRate(conf);
- //SizeID original_size_id = XRRConfigCurrentConfiguration(conf, &original_rotation);
-
-- XCloseDisplay(dpy);
--
- for (int i = 0; i < num_sizes; i++)
- {
- int width = xrrs[i].width;
-@@ -300,6 +298,8 @@ void DisplayWrapper::dw_init(bool filter, int minWidth
- modes.append(mode);
- }
- }
-+
-+ XCloseDisplay(dpy);
-
- if (filter)
- modeNames.removeDuplicates();
Index: patches/patch-game_pro
===================================================================
RCS file: patches/patch-game_pro
diff -N patches/patch-game_pro
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-game_pro 7 Jul 2020 02:33:34 -0000
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Index: game.pro
+--- game.pro.orig
++++ game.pro
+@@ -30,11 +30,8 @@ RCC_DIR += src
+ UI_DIR += src
+
+ unix: {
+- target.path = /usr/games/
++ target.path = ${PREFIX}/bin/
+ INSTALLS += target
+- datas.path = /usr/share/games/jag
+- datas.files = data
+- INSTALLS += datas
+ }
+
+ # The following define makes your compiler warn you if you use any
Index: patches/patch-gameprofile_cpp
===================================================================
RCS file: patches/patch-gameprofile_cpp
diff -N patches/patch-gameprofile_cpp
--- patches/patch-gameprofile_cpp 27 Jan 2013 23:54:51 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-gameprofile_cpp,v 1.1.1.1 2013/01/27 23:54:51 stsp Exp $
---- gameprofile.cpp.orig Wed Jan 9 03:39:07 2013
-+++ gameprofile.cpp Wed Jan 9 03:39:18 2013
-@@ -66,7 +66,7 @@ GameProfile::GameProfile(QObject *parent) : QObject(pa
- #ifdef Q_OS_WIN32
- userPath += "/Application Data/XlabSoft/JAG/";
- #else
-- userPath += "/.xlabsoft/jag/";
-+ userPath += "/.jag/";
- #endif
-
- QDir userdir(userPath);
Index: patches/patch-main_cpp
===================================================================
RCS file: patches/patch-main_cpp
diff -N patches/patch-main_cpp
--- patches/patch-main_cpp 27 Jan 2013 23:54:51 -0000 1.1.1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-main_cpp,v 1.1.1.1 2013/01/27 23:54:51 stsp Exp $
---- main.cpp.orig Wed Jan 9 02:56:19 2013
-+++ main.cpp Wed Jan 9 02:57:07 2013
-@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
- // on X11, we'll check if data directory exists locally first
- #ifdef Q_WS_X11
- if (!QDir(resourcePath).exists())
-- resourcePath = "/usr/local/games/jag/data/";
-+ resourcePath = "${TRUEPREFIX}/share/jag/";
- #endif
-
- if (!QDir(resourcePath).exists()) {
Index: patches/patch-src_displaywrapper_cpp
===================================================================
RCS file: patches/patch-src_displaywrapper_cpp
diff -N patches/patch-src_displaywrapper_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_displaywrapper_cpp 7 Jul 2020 02:33:34 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: src/displaywrapper.cpp
+--- src/displaywrapper.cpp.orig
++++ src/displaywrapper.cpp
+@@ -305,8 +305,6 @@ void DisplayWrapper::dw_init(bool filter, int minWidth
+ //short original_rate = XRRConfigCurrentRate(conf);
+ //SizeID original_size_id = XRRConfigCurrentConfiguration(conf, &original_rotation);
+
+- XCloseDisplay(dpy);
+-
+ for (int i = 0; i < num_sizes; i++)
+ {
+ int width = xrrs[i].width;
+@@ -325,6 +323,8 @@ void DisplayWrapper::dw_init(bool filter, int minWidth
+ modes.append(mode);
+ }
+ }
++
++ XCloseDisplay(dpy);
+
+ if (filter)
+ modeNames.removeDuplicates();
Index: patches/patch-src_editor_jag-editor_pro
===================================================================
RCS file: patches/patch-src_editor_jag-editor_pro
diff -N patches/patch-src_editor_jag-editor_pro
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_editor_jag-editor_pro 7 Jul 2020 02:33:34 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+install jag-editor to correct prefix. jag-editor still works without data files.
+
+Index: src/editor/jag-editor.pro
+--- src/editor/jag-editor.pro.orig
++++ src/editor/jag-editor.pro
+@@ -22,11 +22,8 @@ QMAKE_CXXFLAGS += -g -std=gnu++14 -D_FORTIFY_SOURCE=2
+ QMAKE_LFLAGS += -lpthread -fPIE -pie -Wl,--as-needed -Wl,-z,now
+
+ unix: {
+- target.path = /usr/games/
++ target.path = ${PREFIX}/bin/
+ INSTALLS += target
+- datas.path = /usr/share/games/jag/editor/
+- datas.files = images
+- INSTALLS += datas
+ }
+
+ # The following define makes your compiler warn you if you use any
Index: patches/patch-src_gameprofile_cpp
===================================================================
RCS file: patches/patch-src_gameprofile_cpp
diff -N patches/patch-src_gameprofile_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_gameprofile_cpp 7 Jul 2020 02:33:34 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/gameprofile.cpp
+--- src/gameprofile.cpp.orig
++++ src/gameprofile.cpp
+@@ -88,7 +88,7 @@ GameProfile::GameProfile(QObject *parent) : QObject(pa
+ m_accel(false)
+ {
+ userPath = QDir::homePath();
+- userPath += "/.xlabsoft/jag/";
++ userPath += "/.jag/";
+
+
+ QDir userdir(userPath);
Index: patches/patch-src_main_cpp
===================================================================
RCS file: patches/patch-src_main_cpp
diff -N patches/patch-src_main_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_main_cpp 7 Jul 2020 02:33:34 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/main.cpp
+--- src/main.cpp.orig
++++ src/main.cpp
+@@ -60,7 +60,7 @@ int main(int argc, char *argv[])
+ // on X11, we'll check if data directory exists locally first
+ #ifdef Q_OS_UNIX
+ if (!QDir(resourcePath).exists())
+- resourcePath = "/usr/share/games/jag/data/";
++ resourcePath = "${TRUEPREFIX}/share/jag/";
+ #endif
+
+ if (!QDir(resourcePath).exists()) {
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/games/jag/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 PLIST
--- pkg/PLIST 27 Jan 2013 23:54:51 -0000 1.1.1.1
+++ pkg/PLIST 7 Jul 2020 02:33:34 -0000
@@ -1,5 +1,6 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/01/27 23:54:51 stsp Exp $
@bin bin/jag
+@bin bin/jag-editor
share/jag/
share/jag/bonus/
share/jag/bonus/clock.png
@@ -12,17 +13,19 @@ share/jag/bonus/timer.png
share/jag/bonus/x.png
share/jag/help/
share/jag/help/index.htm
-share/jag/help/index_nl.htm
-share/jag/help/index_ru.htm
share/jag/lang/
share/jag/lang/jag_de.qm
share/jag/lang/jag_de.ts
+share/jag/lang/jag_es.qm
+share/jag/lang/jag_es.ts
share/jag/lang/jag_fr.qm
share/jag/lang/jag_fr.ts
share/jag/lang/jag_it.qm
share/jag/lang/jag_it.ts
share/jag/lang/jag_nl.qm
share/jag/lang/jag_nl.ts
+share/jag/lang/jag_pt.qm
+share/jag/lang/jag_pt.ts
share/jag/lang/jag_ru.qm
share/jag/lang/jag_ru.ts
share/jag/lang/langlist.dat
Rafael Sadowski writes:

> Simple game play test works out-of-box, OK rsadowski@

ping. I am looking for someone to commit this. The diff is reattached.

> On Mon Jul 06, 2020 at 07:39:38PM -0700, Nam Nguyen wrote:
>> Nam Nguyen writes:
>>
>> > Stefan Sperling writes:
>> >>
>> >> Considering that Debian will likely want to see this resolved as well, and
>> >> that you are planning to update the port, couldn't we set PERMIT_PACKAGE=no
>> >> until the situation is cleared up?
>> >>
>> >> We have ports in much worse licensing situations that do the same (look at
>> >> sysutils/firmware/ulpt for example...)
>> >
>> > This sounds like a good solution.
>> >
>> > Here is a diff updating games/jag to 0.3.7, released on May 8, 2020. I
>> > attached it because patches that were removed have DOS line endings. New
>> > patches use post-extract to delete DOS line endings.
>>
>> New diff attached that deletes trailing whitespace in cvs header and
>> additionally sets PERMIT_DISTFILES to no as suggested by stsp@ and
>> sthen@.
>>
>> >
>> > Changelog: https://gitlab.com/coringao/jag/-/blob/0.3.7/CHANGELOG
>> >
>> > This diff:
>> > - Sets PERMIT_PACKAGE to no as suggested by stsp@ and sthen@. Themes are
>> > restrictively licensed so do not build package until it is cleared up.
>> > https://gitlab.com/coringao/jag/-/issues/1
>> > - Moves to new upstream that Debian uses. Old upstream has stopped
>> > development.
>> > https://tracker.debian.org/pkg/jag
>> > - Moves HOMEPAGE and MASTER_SITES to new upstream to address thfr@'s
>> > bug report about defunct HOMEPAGE in the README
>> > https://gitlab.com/coringao/jag/-/issues/2
>> > - Moves to qt5 which was supported since version 0.3.3
>> > - Builds jag-editor in addition to jag. jag-editor is a level editor.
>> > - Many patched files were moved into src
>> > - Delete DOS-line endings in post-extract, as pulled from print/scribus.
>> > - README lists Qt5 Xml as a requirement, but `make
>> > port-lib-depends-check' reports this as an extra WANTLIB.
>> > Extra: Qt5Xml.3
>> > I chose to not include Qt5Xml in WANTLIB.
>> >
>> > I played jag and changed languages. I tested jag-editor by building a
>> > level pack and was able to play my level.
>> >
>> > Feedback and tests are welcome.
>>

No comments:

Post a Comment