[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [emerge] portage/testing/ghosty: commit current situation for mingw
From:       Patrick Spendrin <ps_ml () gmx ! de>
Date:       2015-12-17 22:19:39
Message-ID: E1a9gtf-0003x3-UJ () scm ! kde ! org
[Download RAW message or body]

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/portage/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 = GS_DOCDIR;
+ 
+ /* Define the default library search path. */
+-const char *const gs_lib_default_path = GS_LIB_DEFAULT;
++const char *const gs_lib_default_path = \
"..\\share\\ghostscript\\9.18\\Resource\\Init;..\\share\\ghostscript\\9.18\\lib;..\\sh \
are\\ghostscript\\9.18\\Resource\\Font;..\\share\\ghostscript\\fonts;..\\share\\fonts\ \
\default\\ghostscript;..\\share\\fonts\\default\\Type1;..\\share\\fonts\\default\\True \
Type;..\\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 = GS_INIT;
+diff -Nrub -x '*~' -x '*\.orig' -x'*\.o' \
ghostscript-9.18.orig/contrib/eplaser/gdevescv.c \
ghostscript-9.18/contrib/eplaser/gdevescv.c +--- \
ghostscript-9.18.orig/contrib/eplaser/gdevescv.c	2015-10-05 10:21:11.000000000 +0200 \
++++ ghostscript-9.18/contrib/eplaser/gdevescv.c	2015-12-17 17:12:44.188606100 +0100 \
+@@ -60,7 +60,6 @@ + 
+ #include "math_.h"
+ #include <stdlib.h>		/* for abs() */
+-#include <sys/utsname.h>	/* for uname(2) */
+ #include <ctype.h>		/* for toupper(3) */
+ 
+ #include "time_.h"
+@@ -820,13 +819,8 @@
+ get_sysname ( void )
+ {
+   char *result = NULL;
+-  struct utsname utsn;
+ 
+-  if (0 == uname (&utsn))
+-    {
+-      result = 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/pcl3/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:11.000000000 \
+0200 ++++ ghostscript-9.18/contrib/pcl3/eprn/pagecount.c	2015-12-17 \
20:14:09.981262600 +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 = fileno(f);
+   if (fd == -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) != 0) {
++/*  if (lock_file(filename, f, F_RDLCK) != 0) {
+     fclose(f);
+     return 1;
+   }
+-
++*/
+   /* Read the contents */
+   if (read_count(filename, f, count) != 0) {
+     fclose(f);
+@@ -204,11 +207,11 @@
+   }
+ 
+   /* Lock the file for writing (exclusively) */
+-  if (lock_file(filename, f, F_WRLCK) != 0) {
++/*  if (lock_file(filename, f, F_WRLCK) != 0) {
+     fclose(f);
+     return 1;
+   }
+-
++*/
+   /* Reposition on the beginning. fopen() with "a" as above opens the file at
+      EOF. */
+   if (fseek(f, 0L, SEEK_SET) != 0) {
+diff -Nrub -x '*~' -x '*\.orig' -x'*\.o' ghostscript-9.18.orig/ijs/ijs_exec_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.000000000 +0200 ++++ \
ghostscript-9.18/ijs/ijs_exec_unix.c	2015-12-17 20:18:02.538564100 +0100 +@@ -22,6 \
+22,9 @@ +  * SOFTWARE.
+ **/
+ 
++#ifdef _WIN32
++#include "ijs_exec_win.c"
++#else
+ #include "unistd_.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -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_local_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/ghosty.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'] = 'default'
         self.dependencies['win32libs/zlib'] = 'default'
+        if compiler.isMinGW():
+            self.buildDependencies['dev-util/msys'] = 'default'
 
     def setTargets( self ):
         for ver in ['9.18']:
             self.targets[ ver ] = \
"http://downloads.ghostscript.com/public/ghostscript-" + ver + ".tar.gz"  \
self.targetInstSrc[ ver ] = "ghostscript-" + ver +        if compiler.isMinGW():
+            self.patchToApply['9.18'] = [("ghostscript-9.18-20151217.diff", 1)]
         self.targetDigests['9.18'] = '761c9c25b9f5fe01197bd1510f527b3c1b6eb9de'
         self.defaultTarget = '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.join(dst, \
                "bin"))
-            shutil.copy(os.path.join(src, "bin", "gsdll64.lib"), os.path.join(dst, \
"lib")) +            _bit = "64"
         else:
-            shutil.copy(os.path.join(src, "bin", "gsdll32.dll"), os.path.join(dst, \
                "bin"))
-            shutil.copy(os.path.join(src, "bin", "gsdll32.lib"), os.path.join(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 = "32"
+        shutil.copy(os.path.join(src, "bin", "gsdll%s.dll" % _bit), \
os.path.join(dst, "bin")) +        shutil.copy(os.path.join(src, "bin", "gsdll%s.lib" \
% _bit), os.path.join(dst, "lib")) +        shutil.copy(os.path.join(src, "bin", \
"gswin%s.exe" % _bit), os.path.join(dst, "bin")) +        \
shutil.copy(os.path.join(src, "bin", "gswin%sc.exe" % _bit), os.path.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(dst, \
                "include", "ghostscript"))
         shutil.copy(os.path.join(src, "devices", "gdevdsp.h"), os.path.join(dst, \
"include", "ghostscript")) @@ -68,10 +74,12 @@ class \
PackageMSys(AutoToolsPackageBase):  self.subinfo.options.make.supportsMultijob = \
False  self.subinfo.options.package.packageName = 'ghostscript'
         self.subinfo.options.package.packSources = False
-        if compiler.architecture() == "x64":
-            self.platform = "mingw64"
-        else:
-            self.platform = "mingw"
+        self.subinfo.options.configure.cflags = "-I%s" % utils.toMSysPath( \
os.path.join( self.sourceDir(), "libpng" ) ) +        \
self.subinfo.options.configure.cxxflags = "-I%s" % utils.toMSysPath( os.path.join( \
self.sourceDir(), "libpng" ) ) +#        if compiler.architecture() == "x64":
+#            self.platform = "mingw64"
+#        else:
+#            self.platform = "mingw"
         self.supportsCCACHE = False
 
         self.buildInSource = True


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic