diff options
-rw-r--r-- | pcr/mednaffe-gtk2/PKGBUILD | 34 | ||||
-rw-r--r-- | pcr/mednaffe-gtk2/mednaffe.install | 11 | ||||
-rw-r--r-- | pcr/mednaffe-gtk2/remove-check_version.patch | 91 | ||||
-rw-r--r-- | pcr/mednaffe/PKGBUILD | 62 | ||||
-rw-r--r-- | pcr/mednaffe/remove-check_version.patch | 91 |
5 files changed, 44 insertions, 245 deletions
diff --git a/pcr/mednaffe-gtk2/PKGBUILD b/pcr/mednaffe-gtk2/PKGBUILD deleted file mode 100644 index e63ef1c63..000000000 --- a/pcr/mednaffe-gtk2/PKGBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Maintainer (Arch): MasterLaser <vaporeon@tfwno.gf> -# Maintainer: Márcio Silva <coadde@hyperbola.info> - -pkgname=mednaffe-gtk2 -pkgver=0.8 -pkgrel=2 -pkgdesc="front-end (GUI) for mednafen emulator (GTK2 Version)" -arch=('i686' 'x86_64') -url="https://sites.google.com/site/amatcoder/mednaffe" -license=('GPL') -install=mednaffe.install -depends=('mednafen' 'gtk2') -provides=('mednaffe') -conflicts=('mednaffe') -source=(https://sites.google.com/site/amatcoder/mednaffe/downloads/mednaffe-$pkgver.tar.gz - remove-check_version.patch) -md5sums=('ab7c524d70170b8bba8819e71fc136e0' - 'e62f04ddb2c559a1b4bf022ec7b0cc4c') - -prepare() { - cd "$srcdir"/mednaffe-$pkgver - patch -Np1 -i $srcdir/remove-check_version.patch -} - -build() { - cd "$srcdir"/mednaffe-$pkgver - ./configure --prefix=/usr - make -} - -package() { - cd "$srcdir"/mednaffe-$pkgver - make prefix="$pkgdir"/usr install -} diff --git a/pcr/mednaffe-gtk2/mednaffe.install b/pcr/mednaffe-gtk2/mednaffe.install deleted file mode 100644 index 7dfbefb2b..000000000 --- a/pcr/mednaffe-gtk2/mednaffe.install +++ /dev/null @@ -1,11 +0,0 @@ -post_install() { - gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor -} - -post_upgrade() { - gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor -} - -post_remove() { - gtk-update-icon-cache -q -t -f /usr/share/icons/hicolor -} diff --git a/pcr/mednaffe-gtk2/remove-check_version.patch b/pcr/mednaffe-gtk2/remove-check_version.patch deleted file mode 100644 index 1603ce524..000000000 --- a/pcr/mednaffe-gtk2/remove-check_version.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff -Nur a/src/mednaffe.c b/src/mednaffe.c ---- a/src/mednaffe.c 2015-07-24 11:31:59.000000000 -0300 -+++ b/src/mednaffe.c 2015-08-06 18:06:20.813682795 -0300 -@@ -550,16 +550,6 @@ - return 1; - } - -- /* Check mednafen version */ -- if (!check_version(stout, &gui)) -- { -- show_error( -- "Error: Mednafen version is not compatible.\nYou need 0.9.36.2 \ --version or above.\n"); -- return 1; /* Items are not freed here */ -- } -- g_free(stout); -- - /* Read configuration from mednafen-09x.cfg */ - if (!read_cfg(&gui)) - { -diff -Nur a/src/toggles.c b/src/toggles.c ---- a/src/toggles.c 2015-07-24 11:31:59.000000000 -0300 -+++ b/src/toggles.c 2015-08-06 18:05:09.429070095 -0300 -@@ -376,56 +376,6 @@ - return cfg_path; - } - --gboolean check_version(gchar *stout, guidata *gui) --{ -- if (stout) -- { -- if (strlen(stout)<1) return FALSE; -- -- gchar **achar = g_strsplit(stout, "\n", 0); -- gchar **aline = g_strsplit(achar[0], " ", 2); -- -- if (g_strv_length(aline)<2) return FALSE; -- if (strlen(aline[1])<15) return FALSE; -- -- if (aline[1][11]!='9') -- return FALSE; -- if (aline[1][13]-'0'<3) -- return FALSE; -- if ((aline[1][13]=='3') && ((aline[1][14]-'0')<6)) -- return FALSE; -- -- if (strlen(aline[1])>16) -- { -- if ((aline[1][13]=='3') && (aline[1][14]=='6') && ((aline[1][16]-'0')<2)) -- return FALSE; -- } -- else -- { -- if ((aline[1][13]=='3') && ((aline[1][14]-'0')<7)) -- return FALSE; -- } -- -- print_log("Version detected: ", FE, gui); -- print_log(aline[1], FE, gui); -- #ifdef G_OS_UNIX -- print_log("\n", FE, gui); -- #endif -- print_log("----\n", FE, gui); -- -- GtkStatusbar *sbversion = GTK_STATUSBAR(gtk_builder_get_object(gui->builder, "sbversion")); -- gtk_statusbar_push(GTK_STATUSBAR(sbversion), 1, aline[1]); -- -- gtk_widget_set_tooltip_text(GTK_WIDGET(sbversion), gui->binpath); -- -- g_strfreev(achar); -- g_strfreev(aline); -- -- return TRUE; -- } -- else return FALSE; --} -- - gboolean read_cfg(guidata *gui) - { - gchar *string; -diff -Nur a/src/toggles.h b/src/toggles.h ---- a/src/toggles.h 2015-07-24 11:31:59.000000000 -0300 -+++ b/src/toggles.h 2015-08-06 18:04:52.252922723 -0300 -@@ -29,7 +29,6 @@ - void set_spin(gpointer widget, guidata *gui); - void set_values(GtkBuilder *builder, guidata *gui); - gchar* get_cfg(const gchar *home, guidata *gui); -- gboolean check_version(gchar *stout, guidata *gui); - gboolean read_cfg(guidata *gui); - - #endif /* TOGGLES_H */ diff --git a/pcr/mednaffe/PKGBUILD b/pcr/mednaffe/PKGBUILD index 8fb5858da..a01b07ee8 100644 --- a/pcr/mednaffe/PKGBUILD +++ b/pcr/mednaffe/PKGBUILD @@ -1,32 +1,58 @@ -# Maintainer (Arch): MasterLaser <vaporeon@tfwno.gf> -# Maintainer: Márcio Silva <coadde@hyperbola.info> +# Maintainer: Andreas Grapentin <andreas@grapentin.org> +# Maintainer (AUR): Vaporeon <vaporeon@vaporeon.io> +# Contributor: Márcio Silva <coadde@hyperbola.info> +# Contributor (AUR): casa <sympho08@yandex.ru> -pkgname=mednaffe -pkgver=0.8 -pkgrel=2 -pkgdesc="front-end (GUI) for mednafen emulator" +pkgbase=mednaffe +pkgname=('mednaffe' 'mednaffe-gtk2') +pkgver=0.8.6 +pkgrel=1 arch=('i686' 'x86_64') -url="https://sites.google.com/site/amatcoder/mednaffe" +url="https://github.com/AmatCoder/mednaffe" license=('GPL') +makedepends=('mednafen' 'gtk2' 'gtk3') install=mednaffe.install -depends=('mednafen' 'gtk3') -source=(https://sites.google.com/site/amatcoder/mednaffe/downloads/mednaffe-$pkgver.tar.gz - remove-check_version.patch) -md5sums=('ab7c524d70170b8bba8819e71fc136e0' - 'e62f04ddb2c559a1b4bf022ec7b0cc4c') +source=(https://github.com/AmatCoder/mednaffe/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz) +sha256sums=('cda5e3ae42b696b4322dc89a3a46e4b9da4a4b36c48be454d0e591c284927420') prepare() { - cd "$srcdir"/mednaffe-$pkgver - patch -Np1 -i $srcdir/remove-check_version.patch + cd "$srcdir"/$pkgbase-$pkgver + + mkdir build-gtk2 + cd build-gtk2 + ../configure --prefix=/usr + cd .. + + mkdir build-gtk3 + cd build-gtk3 + ../configure --prefix=/usr --enable-gtk3 + cd .. } build() { - cd "$srcdir"/mednaffe-$pkgver - ./configure --prefix=/usr --enable-gtk3 + cd "$srcdir"/$pkgbase-$pkgver/build-gtk2 + make + + cd "$srcdir"/$pkgbase-$pkgver/build-gtk3 make } -package() { - cd "$srcdir"/mednaffe-$pkgver +package_mednaffe() { + pkgdesc="front-end (GUI) for mednafen emulator" + depends=('mednafen' 'gtk3') + + cd "$srcdir"/$pkgbase-$pkgver/build-gtk3 + + make prefix="$pkgdir"/usr install +} + +package_mednaffe-gtk2() { + pkgdesc="front-end (GUI) for mednafen emulator (GTK2 Version)" + depends=('mednafen' 'gtk2') + provides=('mednaffe') + conflicts=('mednaffe') + + cd "$srcdir"/$pkgbase-$pkgver/build-gtk2 + make prefix="$pkgdir"/usr install } diff --git a/pcr/mednaffe/remove-check_version.patch b/pcr/mednaffe/remove-check_version.patch deleted file mode 100644 index 1603ce524..000000000 --- a/pcr/mednaffe/remove-check_version.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff -Nur a/src/mednaffe.c b/src/mednaffe.c ---- a/src/mednaffe.c 2015-07-24 11:31:59.000000000 -0300 -+++ b/src/mednaffe.c 2015-08-06 18:06:20.813682795 -0300 -@@ -550,16 +550,6 @@ - return 1; - } - -- /* Check mednafen version */ -- if (!check_version(stout, &gui)) -- { -- show_error( -- "Error: Mednafen version is not compatible.\nYou need 0.9.36.2 \ --version or above.\n"); -- return 1; /* Items are not freed here */ -- } -- g_free(stout); -- - /* Read configuration from mednafen-09x.cfg */ - if (!read_cfg(&gui)) - { -diff -Nur a/src/toggles.c b/src/toggles.c ---- a/src/toggles.c 2015-07-24 11:31:59.000000000 -0300 -+++ b/src/toggles.c 2015-08-06 18:05:09.429070095 -0300 -@@ -376,56 +376,6 @@ - return cfg_path; - } - --gboolean check_version(gchar *stout, guidata *gui) --{ -- if (stout) -- { -- if (strlen(stout)<1) return FALSE; -- -- gchar **achar = g_strsplit(stout, "\n", 0); -- gchar **aline = g_strsplit(achar[0], " ", 2); -- -- if (g_strv_length(aline)<2) return FALSE; -- if (strlen(aline[1])<15) return FALSE; -- -- if (aline[1][11]!='9') -- return FALSE; -- if (aline[1][13]-'0'<3) -- return FALSE; -- if ((aline[1][13]=='3') && ((aline[1][14]-'0')<6)) -- return FALSE; -- -- if (strlen(aline[1])>16) -- { -- if ((aline[1][13]=='3') && (aline[1][14]=='6') && ((aline[1][16]-'0')<2)) -- return FALSE; -- } -- else -- { -- if ((aline[1][13]=='3') && ((aline[1][14]-'0')<7)) -- return FALSE; -- } -- -- print_log("Version detected: ", FE, gui); -- print_log(aline[1], FE, gui); -- #ifdef G_OS_UNIX -- print_log("\n", FE, gui); -- #endif -- print_log("----\n", FE, gui); -- -- GtkStatusbar *sbversion = GTK_STATUSBAR(gtk_builder_get_object(gui->builder, "sbversion")); -- gtk_statusbar_push(GTK_STATUSBAR(sbversion), 1, aline[1]); -- -- gtk_widget_set_tooltip_text(GTK_WIDGET(sbversion), gui->binpath); -- -- g_strfreev(achar); -- g_strfreev(aline); -- -- return TRUE; -- } -- else return FALSE; --} -- - gboolean read_cfg(guidata *gui) - { - gchar *string; -diff -Nur a/src/toggles.h b/src/toggles.h ---- a/src/toggles.h 2015-07-24 11:31:59.000000000 -0300 -+++ b/src/toggles.h 2015-08-06 18:04:52.252922723 -0300 -@@ -29,7 +29,6 @@ - void set_spin(gpointer widget, guidata *gui); - void set_values(GtkBuilder *builder, guidata *gui); - gchar* get_cfg(const gchar *home, guidata *gui); -- gboolean check_version(gchar *stout, guidata *gui); - gboolean read_cfg(guidata *gui); - - #endif /* TOGGLES_H */ |