From kde-commits Thu Dec 17 22:19:39 2015 From: Patrick Spendrin Date: Thu, 17 Dec 2015 22:19:39 +0000 To: kde-commits Subject: [emerge] portage/testing/ghosty: commit current situation for mingw Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=145039080302406 Git commit d68dd7a898befa23de1fdba1b95d1652b45d8eff by Patrick Spendrin. Committed on 17/12/2015 at 22:18. Pushed by sengels into branch 'master'. commit current situation for mingw A +124 -0 portage/testing/ghosty/ghostscript-9.18-20151217.diff M +18 -10 portage/testing/ghosty/ghosty.py http://commits.kde.org/emerge/d68dd7a898befa23de1fdba1b95d1652b45d8eff diff --git a/portage/testing/ghosty/ghostscript-9.18-20151217.diff b/portag= e/testing/ghosty/ghostscript-9.18-20151217.diff new file mode 100644 index 0000000..f16a2ea --- /dev/null +++ b/portage/testing/ghosty/ghostscript-9.18-20151217.diff @@ -0,0 +1,124 @@ +diff -Nrub -x '*~' -x '*\.orig' -x'*\.o' ghostscript-9.18.orig/base/gscdef= .c ghostscript-9.18/base/gscdef.c +--- ghostscript-9.18.orig/base/gscdef.c 2015-10-05 10:21:11.000000000 +0200 ++++ ghostscript-9.18/base/gscdef.c 2015-12-17 20:29:06.241525800 +0100 +@@ -81,7 +81,7 @@ + const char *const gs_doc_directory =3D GS_DOCDIR; + = + /* Define the default library search path. */ +-const char *const gs_lib_default_path =3D GS_LIB_DEFAULT; ++const char *const gs_lib_default_path =3D "..\\share\\ghostscript\\9.18\\= Resource\\Init;..\\share\\ghostscript\\9.18\\lib;..\\share\\ghostscript\\9.= 18\\Resource\\Font;..\\share\\ghostscript\\fonts;..\\share\\fonts\\default\= \ghostscript;..\\share\\fonts\\default\\Type1;..\\share\\fonts\\default\\Tr= ueType;..\\msys\\usr\\lib\\DPS\\outline\\base;..\\msys\\usr\\openwin\\lib\\= X11\\fonts\\Type1;..\\msys\\usr\\openwin\\lib\\X11\\fonts\\TrueType"; + = + /* Define the interpreter initialization file. */ + const char *const gs_init_file =3D GS_INIT; +diff -Nrub -x '*~' -x '*\.orig' -x'*\.o' ghostscript-9.18.orig/contrib/epl= aser/gdevescv.c ghostscript-9.18/contrib/eplaser/gdevescv.c +--- ghostscript-9.18.orig/contrib/eplaser/gdevescv.c 2015-10-05 10:21:11.0= 00000000 +0200 ++++ ghostscript-9.18/contrib/eplaser/gdevescv.c 2015-12-17 17:12:44.188606= 100 +0100 +@@ -60,7 +60,6 @@ + = + #include "math_.h" + #include /* for abs() */ +-#include /* for uname(2) */ + #include /* for toupper(3) */ + = + #include "time_.h" +@@ -820,13 +819,8 @@ + get_sysname ( void ) + { + char *result =3D NULL; +- struct utsname utsn; + = +- if (0 =3D=3D uname (&utsn)) +- { +- result =3D strdup (utsn.sysname); +- } +- return result; ++ return strdup("mingw"); + } + = + /* EPSON printer model name translation. +diff -Nrub -x '*~' -x '*\.orig' -x'*\.o' ghostscript-9.18.orig/contrib/pcl= 3/eprn/pagecount.c ghostscript-9.18/contrib/pcl3/eprn/pagecount.c +--- ghostscript-9.18.orig/contrib/pcl3/eprn/pagecount.c 2015-10-05 10:21:1= 1.000000000 +0200 ++++ ghostscript-9.18/contrib/pcl3/eprn/pagecount.c 2015-12-17 20:14:09.981= 262600 +0100 +@@ -61,12 +61,12 @@ + = + static int lock_file(const char *filename, FILE *f, int lock_type) + { ++#if 0 + int + fd, + rc, + tries; + struct flock cmd; +- + /* Obtain file descriptor */ + fd =3D fileno(f); + if (fd =3D=3D -1) { +@@ -94,6 +94,9 @@ + } + = + return 0; ++#else ++ return -1; ++#endif + } + = + /************************************************************************= ****** +@@ -151,11 +154,11 @@ + } + = + /* Lock the file for reading (shared lock) */ +- if (lock_file(filename, f, F_RDLCK) !=3D 0) { ++/* if (lock_file(filename, f, F_RDLCK) !=3D 0) { + fclose(f); + return 1; + } +- ++*/ + /* Read the contents */ + if (read_count(filename, f, count) !=3D 0) { + fclose(f); +@@ -204,11 +207,11 @@ + } + = + /* Lock the file for writing (exclusively) */ +- if (lock_file(filename, f, F_WRLCK) !=3D 0) { ++/* if (lock_file(filename, f, F_WRLCK) !=3D 0) { + fclose(f); + return 1; + } +- ++*/ + /* Reposition on the beginning. fopen() with "a" as above opens the fil= e at + EOF. */ + if (fseek(f, 0L, SEEK_SET) !=3D 0) { +diff -Nrub -x '*~' -x '*\.orig' -x'*\.o' ghostscript-9.18.orig/ijs/ijs_exe= c_unix.c ghostscript-9.18/ijs/ijs_exec_unix.c +--- ghostscript-9.18.orig/ijs/ijs_exec_unix.c 2015-10-05 10:21:11.00000000= 0 +0200 ++++ ghostscript-9.18/ijs/ijs_exec_unix.c 2015-12-17 20:18:02.538564100 +01= 00 +@@ -22,6 +22,9 @@ + * SOFTWARE. + **/ + = ++#ifdef _WIN32 ++#include "ijs_exec_win.c" ++#else + #include "unistd_.h" + #include + #include +@@ -101,3 +104,4 @@ + = + return 0; + } ++#endif +\ No newline at end of file +diff -Nrub -x '*~' -x '*\.orig' -x'*\.o' ghostscript-9.18.orig/psi/iapi.c = ghostscript-9.18/psi/iapi.c +--- ghostscript-9.18.orig/psi/iapi.c 2015-10-05 10:21:12.000000000 +0200 ++++ ghostscript-9.18/psi/iapi.c 2015-12-17 20:46:30.924278200 +0100 +@@ -325,7 +325,7 @@ + * format (in this case whatever codepage is set) to utf8 format.= At + * the moment, all the other OS we care about provide utf8 anyway. + */ +- gs_main_inst_arg_decode(get_minst_from_memory(ctx->memory), gp_lo= cal_arg_encoding_get_codepoint); ++ gs_main_inst_arg_decode(get_minst_from_memory(ctx->memory), NULL/= *gp_local_arg_encoding_get_codepoint*/); + #else + gs_main_inst_arg_decode(get_minst_from_memory(ctx->memory), NULL); + #endif /* WIN32 */ diff --git a/portage/testing/ghosty/ghosty.py b/portage/testing/ghosty/ghos= ty.py index 54a72c5..485e7a4 100644 --- a/portage/testing/ghosty/ghosty.py +++ b/portage/testing/ghosty/ghosty.py @@ -1,15 +1,21 @@ import info import compiler +import os +import utils = class subinfo(info.infoclass): def setDependencies( self ): self.buildDependencies['virtual/base'] =3D 'default' self.dependencies['win32libs/zlib'] =3D 'default' + if compiler.isMinGW(): + self.buildDependencies['dev-util/msys'] =3D 'default' = def setTargets( self ): for ver in ['9.18']: self.targets[ ver ] =3D "http://downloads.ghostscript.com/publ= ic/ghostscript-" + ver + ".tar.gz" self.targetInstSrc[ ver ] =3D "ghostscript-" + ver + if compiler.isMinGW(): + self.patchToApply['9.18'] =3D [("ghostscript-9.18-20151217.dif= f", 1)] self.targetDigests['9.18'] =3D '761c9c25b9f5fe01197bd1510f527b3c1b= 6eb9de' self.defaultTarget =3D '9.18' = @@ -45,13 +51,13 @@ class PackageMSVC(CMakePackageBase): os.mkdir(os.path.join(dst, "include", "ghostscript")) = if compiler.isX64(): - shutil.copy(os.path.join(src, "bin", "gsdll64.dll"), os.path.j= oin(dst, "bin")) - shutil.copy(os.path.join(src, "bin", "gsdll64.lib"), os.path.j= oin(dst, "lib")) + _bit =3D "64" else: - shutil.copy(os.path.join(src, "bin", "gsdll32.dll"), os.path.j= oin(dst, "bin")) - shutil.copy(os.path.join(src, "bin", "gsdll32.lib"), os.path.j= oin(dst, "lib")) - shutil.copy(os.path.join(src, "bin", "gswin64.exe"), os.path.join(= dst, "bin")) - shutil.copy(os.path.join(src, "bin", "gswin64c.exe"), os.path.join= (dst, "bin")) + _bit =3D "32" + shutil.copy(os.path.join(src, "bin", "gsdll%s.dll" % _bit), os.pat= h.join(dst, "bin")) + shutil.copy(os.path.join(src, "bin", "gsdll%s.lib" % _bit), os.pat= h.join(dst, "lib")) + shutil.copy(os.path.join(src, "bin", "gswin%s.exe" % _bit), os.pat= h.join(dst, "bin")) + shutil.copy(os.path.join(src, "bin", "gswin%sc.exe" % _bit), os.pa= th.join(dst, "bin")) shutil.copy(os.path.join(src, "psi", "iapi.h"), os.path.join(dst, = "include", "ghostscript")) shutil.copy(os.path.join(src, "psi", "ierrors.h"), os.path.join(ds= t, "include", "ghostscript")) shutil.copy(os.path.join(src, "devices", "gdevdsp.h"), os.path.joi= n(dst, "include", "ghostscript")) @@ -68,10 +74,12 @@ class PackageMSys(AutoToolsPackageBase): self.subinfo.options.make.supportsMultijob =3D False self.subinfo.options.package.packageName =3D 'ghostscript' self.subinfo.options.package.packSources =3D False - if compiler.architecture() =3D=3D "x64": - self.platform =3D "mingw64" - else: - self.platform =3D "mingw" + self.subinfo.options.configure.cflags =3D "-I%s" % utils.toMSysPat= h( os.path.join( self.sourceDir(), "libpng" ) ) + self.subinfo.options.configure.cxxflags =3D "-I%s" % utils.toMSysP= ath( os.path.join( self.sourceDir(), "libpng" ) ) +# if compiler.architecture() =3D=3D "x64": +# self.platform =3D "mingw64" +# else: +# self.platform =3D "mingw" self.supportsCCACHE =3D False = self.buildInSource =3D True