Skip to content

Commit

Permalink
tagainijisho: peg older systems to qt4 version
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Aug 20, 2024
1 parent 83f920a commit 887c197
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 32 deletions.
80 changes: 48 additions & 32 deletions aqua/tagainijisho/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,55 @@
PortSystem 1.0
PortGroup cmake 1.1
PortGroup github 1.0
PortGroup qt5 1.0

github.setup Gnurou tagainijisho 1.2.2
if {${os.platform} ne "darwin" || ${os.major} > 15} {
PortGroup qt5 1.0

# Needed for Qt5LinguistTools
qt5.depends_component qttools

github.setup Gnurou tagainijisho 1.2.2

checksums rmd160 83a9ecc7f1d5b5ba0ec6871c66a79e2590bb14e0 \
sha256 10fa6aa3a2e0eea0f4456236ac3020db73c76f65cb31a76ad74a107b2d739003 \
size 32366512

# To build docs
depends_build-append port:multimarkdown

patchfiles patch-CMakeLists.txt.diff \
patch-gui-CMakeLists.txt.diff \
patch-pack-CMakeLists.txt.diff

post-destroot {
file copy ${filespath}/qt.conf \
${destroot}${applications_dir}/Tagaini\ Jisho.app/Contents/Resources/

set docdir ${prefix}/share/doc/${name}

xinstall -d ${destroot}${docdir}/html
xinstall -d ${destroot}${docdir}/html/images
xinstall -m 0444 {*}[glob ${worksrcpath}/doc/*.html] \
${destroot}${docdir}/html
xinstall -m 0444 {*}[glob ${worksrcpath}/doc/images/*.png] \
${destroot}${docdir}/html/images
xinstall -m 0644 -W ${worksrcpath} COPYING.txt ChangeLog README.md \
${destroot}${docdir}
}
} else {
# Fallback for legacy systems
PortGroup qt4 1.0

github.setup Gnurou tagainijisho 1.0.3

checksums rmd160 eda4b6c645ffce4298da6890260a246747bf3612 \
sha256 6fe3c579ec1cea6c41393ac9a82dd12d0e240032d2bb7837a90e470f480aaf4e \
size 24816175

patchfiles patch-CMakeLists.txt-1.0.3.diff \
patch-pack-CMakeLists.txt-1.0.3.diff
}

license GPL-3+
categories aqua education japanese
maintainers {khindenburg @kurthindenburg} openmaintainer
Expand All @@ -28,34 +74,4 @@ long_description Tagaini Jisho is a free, open-source Japanese \
homepage http://www.tagaini.net/
github.tarball_from releases

checksums rmd160 83a9ecc7f1d5b5ba0ec6871c66a79e2590bb14e0 \
sha256 10fa6aa3a2e0eea0f4456236ac3020db73c76f65cb31a76ad74a107b2d739003 \
size 32366512

# To build docs
depends_build-append port:multimarkdown

# Needed for Qt5LinguistTools
qt5.depends_component qttools

patchfiles patch-CMakeLists.txt.diff \
patch-gui-CMakeLists.txt.diff \
patch-pack-CMakeLists.txt.diff

configure.pre_args -DCMAKE_INSTALL_PREFIX=${applications_dir}

post-destroot {
file copy ${filespath}/qt.conf \
${destroot}${applications_dir}/Tagaini\ Jisho.app/Contents/Resources/

set docdir ${prefix}/share/doc/${name}

xinstall -d ${destroot}${docdir}/html
xinstall -d ${destroot}${docdir}/html/images
xinstall -m 0444 {*}[glob ${worksrcpath}/doc/*.html] \
${destroot}${docdir}/html
xinstall -m 0444 {*}[glob ${worksrcpath}/doc/images/*.png] \
${destroot}${docdir}/html/images
xinstall -m 0644 -W ${worksrcpath} COPYING.txt ChangeLog README.md \
${destroot}${docdir}
}
11 changes: 11 additions & 0 deletions aqua/tagainijisho/files/patch-CMakeLists.txt-1.0.3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- CMakeLists.txt 2015-03-08 03:30:09.000000000 -0400
+++ CMakeLists.txt 2018-02-25 15:57:52.000000000 -0500
@@ -30,8 +30,6 @@
# 64 bits Intel binary with 10.6 compatibility
if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD_64_BIT}")
- set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.6")
set(CMAKE_PREFIX_PATH "${CMAKE_OSX_SYSROOT}/usr")
set(CMAKE_FRAMEWORK_PATH "${CMAKE_OSX_SYSROOT}/Library/Frameworks:${CMAKE_OSX_SYSROOT}/System/")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pack/MacOS/")
18 changes: 18 additions & 0 deletions aqua/tagainijisho/files/patch-pack-CMakeLists.txt-1.0.3.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- pack/CMakeLists.txt 2015-03-08 03:30:09.000000000 -0400
+++ pack/CMakeLists.txt 2018-02-25 17:07:43.000000000 -0500
@@ -67,13 +67,13 @@
endforeach(LANG ${UI_LANG})

# Qt config
- install(CODE "file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${RESOURCES_DIR}/qt.conf\" \"[Paths]\nPlugins = PlugIns\nTranslations = Translations\n\")" COMPONENT Runtime)
+ install(CODE "file(WRITE \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${RESOURCES_DIR}/qt.conf\" \"[Paths]\nPlugins = PlugIns\nTranslations = Translations\n\")" COMPONENT Runtime)

# Qt plugins
install(CODE "
file(GLOB_RECURSE QTPLUGINS \"\${CMAKE_INSTALL_PREFIX}/${EXE_DIR}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
include(BundleUtilities)
- fixup_bundle(\"${APPS}\" \"${QTPLUGINS}\" \"${QT_LIBRARY_DIRS}\")" COMPONENT Runtime)
+ " COMPONENT Runtime)
else(APPLE)
set(CPACK_PACKAGE_NAME "tagainijisho")
set(ROOT_DIR share/tagainijisho)

0 comments on commit 887c197

Please sign in to comment.