diff --git a/mingw-w64-pgmodeler/0001-pgmodeler-1.0.2-libgui-inc.patch b/mingw-w64-pgmodeler/0001-pgmodeler-1.0.2-libgui-inc.patch new file mode 100644 index 0000000000000..95d77f33b5832 --- /dev/null +++ b/mingw-w64-pgmodeler/0001-pgmodeler-1.0.2-libgui-inc.patch @@ -0,0 +1,12 @@ +diff --git a/libs/libgui/libgui.pro b/libs/libgui/libgui.pro +index 44345d06d..8106c1669 100644 +--- a/libs/libgui/libgui.pro ++++ b/libs/libgui/libgui.pro +@@ -348,6 +348,7 @@ unix|windows: LIBS += $$LIBCANVAS_LIB \ + INCLUDEPATH += $$LIBCANVAS_INC \ + $$LIBCONNECTOR_INC \ + $$LIBCORE_INC \ ++ $$LIBGUI_INC \ + $$LIBPARSERS_INC \ + $$LIBUTILS_INC \ + $$PWD/src/dbobjects \ diff --git a/mingw-w64-pgmodeler/0002-pgmodeler-1.0.2-no-check-update.patch b/mingw-w64-pgmodeler/0002-pgmodeler-1.0.2-no-check-update.patch new file mode 100644 index 0000000000000..edffefb1e521f --- /dev/null +++ b/mingw-w64-pgmodeler/0002-pgmodeler-1.0.2-no-check-update.patch @@ -0,0 +1,26 @@ +diff --git a/assets/conf/defaults/general.conf b/assets/conf/defaults/general.conf +index 60372a4b4..f231f0c71 100644 +--- a/assets/conf/defaults/general.conf ++++ b/assets/conf/defaults/general.conf +@@ -15,7 +15,7 @@ + hide-ext-attribs="false" + canvas-corner-move="true" + invert-rangesel-trigger="false" +- check-update="true" ++ check-update="false" + check-versions="all" + save-last-position="true" + show-main-menu="false" +diff --git a/assets/conf/general.conf b/assets/conf/general.conf +index 60372a4b4..f231f0c71 100644 +--- a/assets/conf/general.conf ++++ b/assets/conf/general.conf +@@ -15,7 +15,7 @@ + hide-ext-attribs="false" + canvas-corner-move="true" + invert-rangesel-trigger="false" +- check-update="true" ++ check-update="false" + check-versions="all" + save-last-position="true" + show-main-menu="false" diff --git a/mingw-w64-pgmodeler/0003-pgmodeler-1.0.2-fix-global-attributes.patch b/mingw-w64-pgmodeler/0003-pgmodeler-1.0.2-fix-global-attributes.patch new file mode 100644 index 0000000000000..0cb76aa9a5c80 --- /dev/null +++ b/mingw-w64-pgmodeler/0003-pgmodeler-1.0.2-fix-global-attributes.patch @@ -0,0 +1,35 @@ +diff --git a/libs/libutils/src/globalattributes.cpp b/libs/libutils/src/globalattributes.cpp +index f9a55529d..a791d5b42 100644 +--- a/libs/libutils/src/globalattributes.cpp ++++ b/libs/libutils/src/globalattributes.cpp +@@ -50,7 +50,7 @@ const QString GlobalAttributes::DbModelBkpExt(".dbk"); + const QString GlobalAttributes::ObjMetadataExt(".omf"); + const QString GlobalAttributes::DirSeparator("/"); + const QString GlobalAttributes::ResourcesDir("res"); +-const QString GlobalAttributes::ConfigurationsDir("conf"); ++const QString GlobalAttributes::ConfigurationsDir("../etc/pgmodeler"); + const QString GlobalAttributes::DefaultConfsDir("defaults"); + const QString GlobalAttributes::ConfsBackupsDir("backups"); + const QString GlobalAttributes::SchemasDir("schemas"); +@@ -59,9 +59,9 @@ const QString GlobalAttributes::XMLSchemaDir("xml"); + const QString GlobalAttributes::CatalogSchemasDir("catalog"); + const QString GlobalAttributes::DataDictSchemaDir("datadict"); + const QString GlobalAttributes::AlterSchemaDir("alter"); +-const QString GlobalAttributes::LanguagesDir("lang"); +-const QString GlobalAttributes::SamplesDir("samples"); +-const QString GlobalAttributes::PluginsDir("plugins"); ++const QString GlobalAttributes::LanguagesDir("../share/pgmodeler/lang"); ++const QString GlobalAttributes::SamplesDir("../share/pgmodeler/samples"); ++const QString GlobalAttributes::PluginsDir("../lib/pgmodeler/plugins"); + const QString GlobalAttributes::SchemaExt(".sch"); + const QString GlobalAttributes::ObjectDTDDir("dtd"); + const QString GlobalAttributes::ObjectDTDExt(".dtd"); +@@ -276,7 +276,7 @@ void GlobalAttributes::setSearchPath(const QString &search_path) + { + setConfigFilesPaths(); + +- SchemasRootPath=GlobalAttributes::getPathFromEnv("PGMODELER_SCHEMAS_PATH", SCHEMASDIR, QString("%1/%2").arg(search_path, SchemasDir)); ++ SchemasRootPath=GlobalAttributes::getPathFromEnv("PGMODELER_SCHEMAS_PATH", SCHEMASDIR, QString("%1/../share/pgmodeler/%2").arg(search_path, SchemasDir)); + LanguagesPath=GlobalAttributes::getPathFromEnv("PGMODELER_LANG_PATH", LANGDIR, QString("%1/%2").arg(search_path, LanguagesDir)); + SamplesPath=getPathFromEnv("PGMODELER_SAMPLES_PATH", SAMPLESDIR, QString("%1/%2").arg(search_path, SamplesDir)); + TmplConfigurationPath=getPathFromEnv("PGMODELER_TMPL_CONF_PATH", CONFDIR, QString("%1/%2").arg(search_path, ConfigurationsDir)); diff --git a/mingw-w64-pgmodeler/PKGBUILD b/mingw-w64-pgmodeler/PKGBUILD new file mode 100644 index 0000000000000..d5c24e3fd31a2 --- /dev/null +++ b/mingw-w64-pgmodeler/PKGBUILD @@ -0,0 +1,71 @@ +# Maintainer: Konstantin Podsvirov + +_realname=pgmodeler +pkgbase=mingw-w64-${_realname} +pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") +pkgver=1.0.2 +pkgrel=1 +pkgdesc="PostgreSQL Database Modeler: an open source CASE tool for modeling PostgreSQL databases (mingw-w64)" +url="https://pgmodeler.io" +license=('GPL3') +arch=('any') +mingw_arch=('mingw64' 'ucrt64' 'clang64') +depends=("${MINGW_PACKAGE_PREFIX}-libxml2" + "${MINGW_PACKAGE_PREFIX}-postgresql" + "${MINGW_PACKAGE_PREFIX}-qt6-svg") +makedepends=("${MINGW_PACKAGE_PREFIX}-cc") + +source=("${_realname}-${pkgver}.tar.gz::https://github.com/${_realname}/${_realname}/archive/v${pkgver}.tar.gz" + '0001-pgmodeler-1.0.2-libgui-inc.patch' + '0002-pgmodeler-1.0.2-no-check-update.patch' + '0003-pgmodeler-1.0.2-fix-global-attributes.patch') +sha256sums=('e02d41db04757d54123265b4bd62d8af40247ba49cb4e32d5ed2bec78e5b93bb' + 'f658ed0129b0402c8d91b44f62498e35f9c1af87ae14ae1a4030f0b9e7b8bf78' + 'ceae3c5dadf80754ffdea133a53a1bd28bca9e837af0c495d52f5651c8e89fef' + '5806e049bf306cf61bbc87880c1bc5e5d42c749170d8ab0f3e3dd9a6b475ac45') + +prepare() { + cd ${srcdir}/${_realname}-${pkgver} + + patch -Np1 -i "${srcdir}"/0001-pgmodeler-1.0.2-libgui-inc.patch + patch -Np1 -i "${srcdir}"/0002-pgmodeler-1.0.2-no-check-update.patch + patch -Np1 -i "${srcdir}"/0003-pgmodeler-1.0.2-fix-global-attributes.patch +} + +build() { + msg2 "Will be in future" +} + +package() { + cd ${srcdir}/${_realname}-${pkgver} + + "${MINGW_PREFIX}"/bin/qmake6.exe CONFIG+=release \ + PREFIX="${pkgdir}${MINGW_PREFIX}" \ + BINDIR="${pkgdir}${MINGW_PREFIX}"/bin \ + PRIVATEBINDIR="${pkgdir}${MINGW_PREFIX}"/bin \ + PRIVATELIBDIR="${pkgdir}${MINGW_PREFIX}"/bin \ + PLUGINSDIR="${pkgdir}${MINGW_PREFIX}"/lib/pgmodeler/plugins \ + CONFDIR="${pkgdir}${MINGW_PREFIX}"/etc/pgmodeler \ + SHAREDIR="${pkgdir}${MINGW_PREFIX}"/share/pgmodeler \ + DOCDIR="${pkgdir}${MINGW_PREFIX}"/share/doc/pgmodeler \ + LANGDIR="${pkgdir}${MINGW_PREFIX}"/share/pgmodeler/lang \ + SAMPLESDIR="${pkgdir}${MINGW_PREFIX}"/share/pgmodeler/samples \ + SCHEMASDIR="${pkgdir}${MINGW_PREFIX}"/share/pgmodeler/schemas \ + PGSQL_LIB="${MINGW_PREFIX}"/bin/libpq.dll \ + PGSQL_INC="${MINGW_PREFIX}"/include \ + XML_INC="${MINGW_PREFIX}"/include/libxml2 \ + XML_LIB="${MINGW_PREFIX}"/bin/libxml2-2.dll \ + NO_UPDATE_CHECK=MSYS2doesthis \ + QMAKE_CXXFLAGS_RELEASE+="${CXXFLAGS} ${CPPFLAGS}" \ + pgmodeler.pro + + make + + make INSTALL_ROOT="" install + + rm "${pkgdir}${MINGW_PREFIX}/bin/"lib*.dll.a + rm "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}/"{LICENSE,README.md} + + install -Dm644 LICENSE ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE +} +