From 92c485e6859292efaf1ef032b01170ec45604d43 Mon Sep 17 00:00:00 2001 From: UsernameRandomlyGenerated Date: Thu, 11 Feb 2021 11:57:46 +0100 Subject: [PATCH] gpick: update to 0.2.6. -Switch to cmake (as advised by upstream) -Use GTK3 instead of GTK2 --- srcpkgs/gpick/patches/scons-python3.patch | 145 ---------------------- srcpkgs/gpick/template | 17 ++- 2 files changed, 8 insertions(+), 154 deletions(-) delete mode 100644 srcpkgs/gpick/patches/scons-python3.patch diff --git a/srcpkgs/gpick/patches/scons-python3.patch b/srcpkgs/gpick/patches/scons-python3.patch deleted file mode 100644 index a257e73def8..00000000000 --- a/srcpkgs/gpick/patches/scons-python3.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff --git SConscript SConscript -index 43f9857..6065023 100644 ---- SConscript -+++ SConscript -@@ -48,7 +48,7 @@ env.AddCustomBuilders() - env.GetVersionInfo() - - try: -- umask = os.umask(022) -+ umask = os.umask(0o22) - except OSError: # ignore on systems that don't support umask - pass - -@@ -81,56 +81,20 @@ if not env.GetOption('clean'): - - env = conf.Finish() - --if os.environ.has_key('CC'): -+if 'CC' in os.environ: - env['CC'] = os.environ['CC'] --if os.environ.has_key('CFLAGS'): -+ -+if 'CFLAGS' in os.environ: - env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS']) --if os.environ.has_key('CXX'): -+if 'CXX' in os.environ: - env['CXX'] = os.environ['CXX'] --if os.environ.has_key('CXXFLAGS'): -+if 'CXXFLAGS' in os.environ: - env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS']) --if os.environ.has_key('LDFLAGS'): -+if 'LDFLAGS' in os.environ: - env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS']) - - Decider('MD5-timestamp') - --if not env['TOOLCHAIN'] == 'msvc': -- if not (os.environ.has_key('CFLAGS') or os.environ.has_key('CXXFLAGS') or os.environ.has_key('LDFLAGS')): -- if env['DEBUG']: -- env.Append( -- CPPFLAGS = ['-Wall', '-g3', '-O0'], -- CFLAGS = ['-Wall', '-g3', '-O0'], -- LINKFLAGS = ['-Wl,-as-needed'], -- ) -- else: -- env.Append( -- CPPDEFINES = ['NDEBUG'], -- CDEFINES = ['NDEBUG'], -- CPPFLAGS = ['-Wall', '-O3'], -- CFLAGS = ['-Wall', '-O3'], -- LINKFLAGS = ['-Wl,-as-needed', '-s'], -- ) -- -- if env['BUILD_TARGET'] == 'win32': -- env.Append( -- LINKFLAGS = ['-Wl,--enable-auto-import', '-static-libgcc', '-static-libstdc++'], -- CPPDEFINES = ['_WIN32_WINNT=0x0501'], -- ) --else: -- env['LINKCOM'] = [env['LINKCOM'], 'mt.exe -nologo -manifest ${TARGET}.manifest -outputresource:$TARGET;1'] -- if env['DEBUG']: -- env.Append( -- CPPFLAGS = ['/Od', '/EHsc', '/MD', '/Gy', '/Zi', '/TP', '/wd4819'], -- CPPDEFINES = ['WIN32', '_DEBUG'], -- LINKFLAGS = ['/MANIFEST', '/DEBUG'], -- ) -- else: -- env.Append( -- CPPFLAGS = ['/O2', '/Oi', '/GL', '/EHsc', '/MD', '/Gy', '/Zi', '/TP', '/wd4819'], -- CPPDEFINES = ['WIN32', 'NDEBUG'], -- LINKFLAGS = ['/MANIFEST', '/LTCG'], -- ) -- - extern_libs = SConscript(['extern/SConscript'], exports='env') - executable, parser_files = SConscript(['source/SConscript'], exports='env') - -diff --git source/SConscript source/SConscript -index b78bfb5..ca42710 100644 ---- source/SConscript -+++ source/SConscript -@@ -50,6 +50,8 @@ if local_env['BUILD_TARGET'] == 'win32': - elif local_env['BUILD_TARGET'] == 'linux2': - local_env.Append(LIBS=['rt', 'expat']) - -+local_env.Append(LIBS=['expat']) -+ - executable = local_env.Program( - 'gpick', - source = [sources, objects]) -diff --git tools/gpick.py tools/gpick.py -index 29000a6..5aecfe8 100644 ---- tools/gpick.py -+++ tools/gpick.py -@@ -9,10 +9,10 @@ import sys - import glob - import subprocess - --from lemon import * --from flex import * --from gettext import * --from resource_template import * -+from .lemon import * -+from .flex import * -+from .gettext import * -+from .resource_template import * - - from SCons.Script import * - from SCons.Util import * -@@ -79,9 +79,9 @@ class GpickEnvironment(SConsEnvironment): - def ConfirmPrograms(self, conf, programs): - conf.AddTests({'CheckProgram': CheckProgram}) - -- for evar, args in programs.iteritems(): -+ for evar, args in programs.items(): - found = False -- for name, member_name in args['checks'].iteritems(): -+ for name, member_name in args['checks'].items(): - if conf.CheckProgram(self, name, member_name): - found = True; - break -@@ -95,9 +95,9 @@ class GpickEnvironment(SConsEnvironment): - def ConfirmLibs(self, conf, libs): - conf.AddTests({'CheckPKG': CheckPKG}) - -- for evar, args in libs.iteritems(): -+ for evar, args in libs.items(): - found = False -- for name, version in args['checks'].iteritems(): -+ for name, version in args['checks'].items(): - if conf.CheckPKG(name + ' ' + version): - self[evar]=name - found = True; -@@ -127,9 +127,9 @@ class GpickEnvironment(SConsEnvironment): - self.AddPostAction(i, Chmod(i, perm)) - return dir - -- InstallProgram = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0755) -- InstallData = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0644) -- InstallDataAutoDir = lambda self, dir, relative_dir, source: GpickEnvironment.InstallPermAutoDir(self, dir, relative_dir, source, 0644) -+ InstallProgram = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0o755) -+ InstallData = lambda self, dir, source: GpickEnvironment.InstallPerm(self, dir, source, 0o644) -+ InstallDataAutoDir = lambda self, dir, relative_dir, source: GpickEnvironment.InstallPermAutoDir(self, dir, relative_dir, source, 0o644) - - def GetSourceFiles(self, dir_exclude_pattern, file_exclude_pattern): - dir_exclude_prog = re.compile(dir_exclude_pattern) diff --git a/srcpkgs/gpick/template b/srcpkgs/gpick/template index 5a538a068f2..0feb5e3957f 100644 --- a/srcpkgs/gpick/template +++ b/srcpkgs/gpick/template @@ -1,21 +1,20 @@ # Template file for 'gpick' pkgname=gpick -version=0.2.5 -revision=5 +version=0.2.6 +revision=1 wrksrc="${pkgname}-${pkgname}-${version}" -build_style=scons -hostmakedepends="gettext pkg-config" -makedepends="boost-devel gtk+-devel lua52-devel expat-devel" +build_style=cmake +hostmakedepends="gettext pkg-config ragel" +makedepends="boost-devel gtk+3-devel lua52-devel expat-devel" short_desc="Advanced color picker written in C++ using GTK+ toolkit" maintainer="Alexander Mamay " license="BSD-3-Clause" homepage="https://github.com/thezbyg/gpick" distfiles="https://github.com/thezbyg/gpick/archive/${pkgname}-${version}.tar.gz" -checksum=3a9706c101f82e9a49880db9fb408c760d49e6b4506ee5768962c25ec2ecbb57 +checksum=7d02be171cc88c44ad3e3572c0922bbabedc9d542b989f324fca9d5db3161e9c -do_install() { - scons DESTDIR=${DESTDIR}/usr install +post_install() { rm -rf ${DESTDIR}/usr/share/doc - vlicense installer/License.txt LICENSE + vlicense LICENSE.txt LICENSE }