aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Hogge <agh@riseup.net>2022-11-10 07:25:39 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2022-11-10 07:25:39 +0000
commita79118c74d12885ed5f35285832126b8a429421f (patch)
treec65bbd72b9479804c7c071d55c2af55dceb78e85
parentcd8ca1fdef3d403bb4fc25b4c1b94d9774c0e1ef (diff)
downloadports-a79118c74d12885ed5f35285832126b8a429421f.tar.gz
ports-a79118c74d12885ed5f35285832126b8a429421f.zip
emulators/qmc2: Update to 0.243
-rw-r--r--emulators/qmc2/Makefile137
-rw-r--r--emulators/qmc2/distinfo6
-rw-r--r--emulators/qmc2/files/Makefile4
-rw-r--r--emulators/qmc2/files/patch-qmc2_htmleditor_htmleditor.ui11
-rw-r--r--emulators/qmc2/files/patch-qmc2_imagechecker.cpp9
-rw-r--r--emulators/qmc2/files/patch-qmc2_lzma_7zTypes.h23
-rw-r--r--emulators/qmc2/files/patch-qmc2_softwareimagewidget.cpp10
-rw-r--r--emulators/qmc2/files/pkg-message.in12
-rw-r--r--emulators/qmc2/pkg-descr5
-rw-r--r--emulators/qmc2/pkg-message14
-rw-r--r--emulators/qmc2/pkg-plist42
11 files changed, 104 insertions, 169 deletions
diff --git a/emulators/qmc2/Makefile b/emulators/qmc2/Makefile
index 4cbf5c3ac087..158ec864d5c3 100644
--- a/emulators/qmc2/Makefile
+++ b/emulators/qmc2/Makefile
@@ -1,76 +1,101 @@
PORTNAME= qmc2
-PORTVERSION= 0.195
-PORTREVISION= 4
-CATEGORIES= emulators
-MASTER_SITES= SF
+PORTVERSION= 0.243
+DISTVERSIONPREFIX= v
+CATEGORIES= emulators games
-MAINTAINER= ports@FreeBSD.org
-COMMENT= Qt based UNIX MAME/MESS frontend
+MAINTAINER= agh@riseup.net
+COMMENT= Qt based UNIX MAME frontend
WWW= https://qmc2.batcom-it.net/
-RUN_DEPENDS= mame>=0.154:emulators/mame \
- mess>=0.154:emulators/mess
+LICENSE= GPLv2+
-OPTIONS_DEFINE= DOCS
+BUILD_DEPENDS= bash>0:shells/bash \
+ gawk>0:lang/gawk
+RUN_DEPENDS= libglvnd>0:graphics/libglvnd \
+ mame>=0.249:emulators/mame \
+ mess>=0.249:emulators/mess
-NO_WRKSUBDIR= yes
-
-USES= compiler:c++11-lang dos2unix gl gmake qt:5 sdl tar:bzip2 xorg
-USE_XORG= x11 xmu
+USES= compiler:c++11-lang desktop-file-utils gmake gl qt:5 sdl \
+ shebangfix tar:bzip2 xorg
+USE_GITHUB= yes
+GH_ACCOUNT= qmc2
+GH_PROJECT= qmc2-mame-fe
USE_GL= gl glu
-USE_QT= buildtools:build core declarative gui multimedia \
- network opengl qmake:build \
- testlib script scripttools sql svg \
- webkit widgets xml xmlpatterns
-USE_SDL= sdl
-
-CXXFLAGS+= -I${LOCALBASE}/include/SDL/
-MAKE_ARGS= QTDIR="${PREFIX}" QMAKE="${QMAKE}" \
- SYSCONFDIR="${PREFIX}/etc" ARCH="${OPSYS}" \
+USE_QT= buildtools core declarative gui multimedia network opengl qmake \
+ script scripttools sql svg testlib webkit widgets xml \
+ xmlpatterns
+USE_SDL= sdl2
+USE_XORG= x11 xmu
+
+SHEBANG_FILES= scripts/cleanup-category-ini.sh \
+ scripts/make-man-pages.sh \
+ scripts/plugin_helper.sh \
+ scripts/sdl-defines.sh \
+ scripts/sdl-includepath.sh \
+ scripts/sdl-libs.sh \
+ scripts/sdl-version.sh \
+ scripts/strip-png-headers.sh
+
+MAKE_ARGS= ARCH="${OPSYS}" \
+ CC="${CC}" \
CC_FLAGS="${CFLAGS} -DUSE_FILE32API" \
+ CXX="${CXX}" \
CXX_FLAGS="${CXXFLAGS} -DUSE_FILE32API" \
- CC="${CC}" CXX="${CXX}" LINK="${CXX}"
+ DATADIR="${DATADIR}" \
+ LINK="${CXX}" \
+ MAKE="${MAKE_CMD}" \
+ PHONON="0" \
+ QMAKE="${QMAKE}" \
+ QTDIR="${PREFIX}" \
+ SYSCONFDIR="${PREFIX}/etc"
+
+ALL_TARGET= all arcade tools
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+DOCS_DESC= Comprehensive qmc2 documentaion
-DESKTOP_ENTRIES="QMC2" "MAME frontend" "${DATADIR}/img/mame.png" \
- "${PORTNAME}-sdlmame" "Game;Emulator;Qt;" "true" \
- "QMC2 Arcade" "QMC2 Arcade Mode" "${DATADIR}/img/qmc2-arcade.png" \
- "${PORTNAME}-arcade" "Game;Emulator;Qt;" "true" \
- "CHDMAN GUI" "Qt CHDMAN GUI" "${DATADIR}/img/qchdman.png" \
- "qchdman" "Game;Emulator;Qt;" "true" \
+DOCS_ALL_TARGET= doc
+DOCS_PORTDOCS= html
-# This seems to be third-party, and has DOS line-endings. It also
-# needs to be patched because of a confusing build error: #define True 1
-# is a bad idea in C++ code that *also* uses True as an identifier
-# in some scopes.
-DOS2UNIX_FILES= qmc2/lzma/7zTypes.h
+.include <bsd.port.options.mk>
post-patch:
- @${CP} ${FILESDIR}/Makefile ${WRKSRC}
- @(cd ${WRKSRC}/qmc2/inst; ${SED} -e 's|DATADIR|${PREFIX}/share|' \
- < qmc2.ini.template > qmc2.ini)
- @${REINPLACE_CMD} -e 's/bash/sh/' ${WRKSRC}/qmc2/scripts/sdl-libs.sh
+ @${REINPLACE_CMD} -e 's|DATADIR/qmc2|${DATADIR}|g' \
+ ${WRKSRC}/inst/*.template
do-install:
- (cd ${WRKSRC}/qmc2 && ${INSTALL_PROGRAM} qmc2-sdlmame \
+ (cd ${WRKSRC} && ${INSTALL_PROGRAM} qmc2-sdlmame \
+ ${STAGEDIR}${PREFIX}/bin/qmc2-mame)
+ (cd ${WRKSRC}/src/arcade && ${INSTALL_PROGRAM} qmc2-arcade \
${STAGEDIR}${PREFIX}/bin)
- (cd ${WRKSRC}/qmc2/arcade && ${INSTALL_PROGRAM} qmc2-arcade \
- ${STAGEDIR}${PREFIX}/bin)
- (cd ${WRKSRC}/qmc2/tools/qchdman && ${INSTALL_PROGRAM} qchdman \
+ (cd ${WRKSRC}/src/tools/qchdman && ${INSTALL_PROGRAM} qchdman \
${STAGEDIR}${PREFIX}/bin)
+
+ @${MKDIR} ${STAGEDIR}${DATADIR}
+.for data in img lng opt
+ (cd ${WRKSRC}/data && ${COPYTREE_SHARE} ${data} \
+ ${STAGEDIR}${DATADIR})
+.endfor
+
+ ${INSTALL_MAN} ${WRKSRC}/data/doc/man/qchdman.6.gz \
+ ${STAGEDIR}${MANPREFIX}/man/man6
+ ${INSTALL_MAN} ${WRKSRC}/data/doc/man/qmc2-arcade.6.gz \
+ ${STAGEDIR}${MANPREFIX}/man/man6
+ ${INSTALL_MAN} ${WRKSRC}/data/doc/man/qmc2-main-gui.6.gz \
+ ${STAGEDIR}${MANPREFIX}/man/man6/qmc2-mame.6.gz
+
+.for dsktop_entry in qchdman.desktop qmc2-arcade.desktop qmc2.desktop
+ (cd ${WRKSRC}/inst && ${INSTALL_DATA} ${dsktop_entry}.template \
+ ${STAGEDIR}${LOCALBASE}/share/applications/${dsktop_entry})
+.endfor
+
@${MKDIR} ${STAGEDIR}${ETCDIR}
- (cd ${WRKSRC}/qmc2/inst && ${INSTALL_DATA} qmc2.ini \
- ${STAGEDIR}${ETCDIR})
- @${MKDIR} ${STAGEDIR}${DATADIR}/img
- @(cd ${WRKSRC}/qmc2/data/img; ${COPYTREE_SHARE} . \
- ${STAGEDIR}${DATADIR}/img)
- @${MKDIR} ${STAGEDIR}${DATADIR}/lng
- (cd ${WRKSRC}/qmc2/data/lng && ${INSTALL_DATA} qmc2_*.qm \
- ${STAGEDIR}${DATADIR}/lng)
- @${MKDIR} ${STAGEDIR}${DATADIR}/opt
- @(cd ${WRKSRC}/qmc2/data/opt; ${COPYTREE_SHARE} . \
- ${STAGEDIR}${DATADIR}/opt)
- @${MKDIR} ${STAGEDIR}${DOCSDIR}/html
- @(cd ${WRKSRC}/qmc2/data/doc/html; ${COPYTREE_SHARE} . \
- ${STAGEDIR}${DOCSDIR}/html)
+ (cd ${WRKSRC}/inst && ${INSTALL_DATA} qmc2.ini.template \
+ ${STAGEDIR}${ETCDIR}/qmc2.ini.sample)
+
+do-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ @(cd ${WRKSRC}/data/doc && ${COPYTREE_SHARE} html \
+ ${STAGEDIR}${DOCSDIR})
.include <bsd.port.mk>
diff --git a/emulators/qmc2/distinfo b/emulators/qmc2/distinfo
index 762d1e684dd0..2458924e6946 100644
--- a/emulators/qmc2/distinfo
+++ b/emulators/qmc2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1520181492
-SHA256 (qmc2-0.195.tar.bz2) = 44b36a80ab7cd23e0efc3e0296ea680b38dd122319379bf6a4dcb9c2111183e7
-SIZE (qmc2-0.195.tar.bz2) = 13463384
+TIMESTAMP = 1651496883
+SHA256 (qmc2-qmc2-mame-fe-v0.243_GH0.tar.gz) = 0608a4e08bc451ae01856b85525f1dc767e01eb823e7e294c772876971e7609b
+SIZE (qmc2-qmc2-mame-fe-v0.243_GH0.tar.gz) = 14446061
diff --git a/emulators/qmc2/files/Makefile b/emulators/qmc2/files/Makefile
deleted file mode 100644
index 9ce72bd82fd8..000000000000
--- a/emulators/qmc2/files/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-all:
- ${MAKE} -C qmc2 DISTCFG=1 SDL=1
- ${MAKE} -C qmc2 arcade DISTCFG=1 SDL=1
- ${MAKE} -C qmc2 qchdman DISTCFG=1 SDL=1
diff --git a/emulators/qmc2/files/patch-qmc2_htmleditor_htmleditor.ui b/emulators/qmc2/files/patch-qmc2_htmleditor_htmleditor.ui
deleted file mode 100644
index b3a2c72a880c..000000000000
--- a/emulators/qmc2/files/patch-qmc2_htmleditor_htmleditor.ui
+++ /dev/null
@@ -1,11 +0,0 @@
---- qmc2/htmleditor/htmleditor.ui.orig 2018-12-11 18:01:15 UTC
-+++ qmc2/htmleditor/htmleditor.ui
-@@ -771,7 +771,7 @@
- <customwidget>
- <class>QWebView</class>
- <extends>QWidget</extends>
-- <header>QtWebKit/QWebView</header>
-+ <header>QtWebKitWidgets/QWebView</header>
- </customwidget>
- </customwidgets>
- <resources>
diff --git a/emulators/qmc2/files/patch-qmc2_imagechecker.cpp b/emulators/qmc2/files/patch-qmc2_imagechecker.cpp
deleted file mode 100644
index 0f42c7f184df..000000000000
--- a/emulators/qmc2/files/patch-qmc2_imagechecker.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-Workaround where the LZMA headers #define False 0, while
-parts of QtCore (the new qcborflags?) use False as an identifier.
---- qmc2/imagechecker.cpp.orig 2016-09-04 14:08:00 UTC
-+++ qmc2/imagechecker.cpp
-@@ -1,3 +1,4 @@
-+#include <QtCore/QtCore>
- #include <QFileDialog>
- #include <QTest>
- #include <QMap>
diff --git a/emulators/qmc2/files/patch-qmc2_lzma_7zTypes.h b/emulators/qmc2/files/patch-qmc2_lzma_7zTypes.h
deleted file mode 100644
index 03ea8278da17..000000000000
--- a/emulators/qmc2/files/patch-qmc2_lzma_7zTypes.h
+++ /dev/null
@@ -1,23 +0,0 @@
-This avoids errors list the following, where True is a C++
-identifier used in scoped context; the #define eats it.
-
-/usr/local/include/qt5/QtCore/qcborstreamreader.h:143:76: error: expected unqualified-id
- bool isFalse() const { return isSimpleType(QCborSimpleType::False); }
- ^
-lzma/7zTypes.h:98:15: note: expanded from macro 'False'
-#define False 0
-
---- qmc2/lzma/7zTypes.h.orig 2020-05-30 14:14:41 UTC
-+++ qmc2/lzma/7zTypes.h
-@@ -94,8 +94,11 @@ typedef size_t SizeT;
- #endif
-
- typedef int Bool_7z;
-+#ifndef __cplusplus
-+/* Only for library internals */
- #define True 1
- #define False 0
-+#endif
-
-
- #ifdef _WIN32
diff --git a/emulators/qmc2/files/patch-qmc2_softwareimagewidget.cpp b/emulators/qmc2/files/patch-qmc2_softwareimagewidget.cpp
deleted file mode 100644
index 4acc0f891881..000000000000
--- a/emulators/qmc2/files/patch-qmc2_softwareimagewidget.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- qmc2/softwareimagewidget.cpp.orig 2020-06-24 12:40:06 UTC
-+++ qmc2/softwareimagewidget.cpp
-@@ -3,6 +3,7 @@
- #include <QHash>
- #include <QDir>
- #include <QClipboard>
-+#include <QPainterPath>
-
- #include "softwarelist.h"
- #include "softwaresnapshot.h"
diff --git a/emulators/qmc2/files/pkg-message.in b/emulators/qmc2/files/pkg-message.in
deleted file mode 100644
index a8d1d6d5efc7..000000000000
--- a/emulators/qmc2/files/pkg-message.in
+++ /dev/null
@@ -1,12 +0,0 @@
-[
-{ type: install
- message: <<EOM
-QMC2 has been installed.
-
-An example configuration file, "qmc2.ini.sample", has been
-installed at "%%EXAMPLESDIR%%".
-
-To use, remove the .sample suffix, and copy to "%%ETCDIR%%".
-EOM
-}
-]
diff --git a/emulators/qmc2/pkg-descr b/emulators/qmc2/pkg-descr
index d5a84c10251c..7a2718dc4811 100644
--- a/emulators/qmc2/pkg-descr
+++ b/emulators/qmc2/pkg-descr
@@ -11,6 +11,5 @@ major deficiency of QMamecat. QMC2 now uses a template based emulator
configuration scheme, which can easily be enhanced with additional
command line options (defined in an XML template file).
-As a result of this flexible design, QMC2 can be used for multiple
-emulators. Currently we support SDLMAME & SDLMESS on UNIX and Mac, and
-the original variants of MAME & MESS on Windows.
+QMC2 is now built with Qt 5, and currently supports MAME on Unix,
+Mac OS X, and Windows.
diff --git a/emulators/qmc2/pkg-message b/emulators/qmc2/pkg-message
deleted file mode 100644
index 5df2a0804f18..000000000000
--- a/emulators/qmc2/pkg-message
+++ /dev/null
@@ -1,14 +0,0 @@
-[
-{ type: install
- message: <<EOM
-QMC2 has been installed.
-
-You can download game preview images (screenshots) and flyer images here:
-
-http://www.mameworld.net/mamecat/download.html
-
-Extract them to a directory (like "~/.qmc2/prv" and "~/.qmc2/fly") and tell
-the program where to find them in the path configuration.
-EOM
-}
-]
diff --git a/emulators/qmc2/pkg-plist b/emulators/qmc2/pkg-plist
index b8c07de5fe16..ceb6806ec7e2 100644
--- a/emulators/qmc2/pkg-plist
+++ b/emulators/qmc2/pkg-plist
@@ -1,29 +1,12 @@
bin/qchdman
bin/qmc2-arcade
-bin/qmc2-sdlmame
-%%ETCDIR%%/qmc2.ini
-%%PORTDOCS%%%%DOCSDIR%%/html/de/credits.html
-%%PORTDOCS%%%%DOCSDIR%%/html/de/index.html
-%%PORTDOCS%%%%DOCSDIR%%/html/images/ballou.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/doc-bg.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/qmc2_logo.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/rene.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/robert.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/sammy.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/samwise.gif
-%%PORTDOCS%%%%DOCSDIR%%/html/images/sphere_blue.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/sphere_green.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/sphere_grey.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/sphere_red.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/sphere_yellowgreen.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/teddy.png
-%%PORTDOCS%%%%DOCSDIR%%/html/images/vas.png
-%%PORTDOCS%%%%DOCSDIR%%/html/us/changes.html
-%%PORTDOCS%%%%DOCSDIR%%/html/us/copying.html
-%%PORTDOCS%%%%DOCSDIR%%/html/us/credits.html
-%%PORTDOCS%%%%DOCSDIR%%/html/us/index.html
-%%PORTDOCS%%%%DOCSDIR%%/html/us/readme.html
-%%PORTDOCS%%%%DOCSDIR%%/html/us/todo.html
+bin/qmc2-mame
+man/man6/qchdman.6.gz
+man/man6/qmc2-arcade.6.gz
+man/man6/qmc2-mame.6.gz
+share/applications/qchdman.desktop
+share/applications/qmc2-arcade.desktop
+share/applications/qmc2.desktop
%%DATADIR%%/img/1.png
%%DATADIR%%/img/2.png
%%DATADIR%%/img/3.png
@@ -1903,14 +1886,25 @@ bin/qmc2-sdlmame
%%DATADIR%%/img/zoom-none.png
%%DATADIR%%/img/zoom-out.png
%%DATADIR%%/lng/qmc2_de.qm
+%%DATADIR%%/lng/qmc2_de.ts
%%DATADIR%%/lng/qmc2_el.qm
+%%DATADIR%%/lng/qmc2_el.ts
%%DATADIR%%/lng/qmc2_es.qm
+%%DATADIR%%/lng/qmc2_es.ts
%%DATADIR%%/lng/qmc2_fr.qm
+%%DATADIR%%/lng/qmc2_fr.ts
%%DATADIR%%/lng/qmc2_it.qm
+%%DATADIR%%/lng/qmc2_it.ts
%%DATADIR%%/lng/qmc2_pl.qm
+%%DATADIR%%/lng/qmc2_pl.ts
%%DATADIR%%/lng/qmc2_pt.qm
+%%DATADIR%%/lng/qmc2_pt.ts
%%DATADIR%%/lng/qmc2_ro.qm
+%%DATADIR%%/lng/qmc2_ro.ts
%%DATADIR%%/lng/qmc2_sv.qm
+%%DATADIR%%/lng/qmc2_sv.ts
%%DATADIR%%/lng/qmc2_us.qm
+%%DATADIR%%/lng/qmc2_us.ts
%%DATADIR%%/opt/MAME/template.xml
%%DATADIR%%/opt/SDLMAME/template-SDL2.xml
+@sample %%ETCDIR%%/qmc2.ini.sample