Skip to content

Commit

Permalink
poedit: new port @2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
l2dy committed May 8, 2018
1 parent f920627 commit 438bed1
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 0 deletions.
46 changes: 46 additions & 0 deletions editors/poedit/Portfile
@@ -0,0 +1,46 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup github 1.0
PortGroup xcode 1.0

github.setup vslavik poedit 2.0.7 v -oss
categories editors
platforms darwin
license MIT
maintainers {l2dy @l2dy} openmaintainer
description Gettext translations editor
long_description This program is GUI frontend to GNU gettext utilities \
and catalogs editor/source code parser.
homepage https://poedit.net/

depends_build port:gsed \
port:ninja

fetch.type git

post-fetch {
system -W ${worksrcpath} "git submodule update --init"
}

patchfiles patch-deps-tool-path.diff \
patch-remove-sparkle.diff

if {${configure.sdkroot} eq ""} {
patchfiles-append patch-deps-sdkroot.diff
}

post-patch {
reinplace -W "${worksrcpath}" "s|@@PREFIX@@|${prefix}|g" \
deps/build.vars.ninja deps/build_deps.sh
}

xcode.configuration "Release"
xcode.scheme "Poedit"
xcode.build.settings OBJROOT=${worksrcpath}/build/ \
SYMROOT=${worksrcpath}/build/
xcode.destroot.settings ${xcode.build.settings}

build.pre_args -workspace Poedit2.xcworkspace \
-derivedDataPath ./DerivedData
destroot.pre_args ${build.pre_args}
15 changes: 15 additions & 0 deletions editors/poedit/files/patch-deps-sdkroot.diff
@@ -0,0 +1,15 @@
diff --git deps/build.vars.ninja deps/build.vars.ninja
index 36bf5820d..184a58428 100644
--- deps/build.vars.ninja
+++ deps/build.vars.ninja
@@ -10,8 +10,8 @@ ncpu = `sysctl -n hw.ncpu`
intdir = $builddir/_intermediate

makeflags = -j$ncpu -l$ncpu
-cflags_sdk = -arch $arch -isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET
-ldflags_sdk = $cflags_sdk -Wl,-syslibroot,$SDKROOT -Wl,-macosx_version_min,$MACOSX_DEPLOYMENT_TARGET
+cflags_sdk = -arch $arch -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET
+ldflags_sdk = $cflags_sdk -Wl,-macosx_version_min,$MACOSX_DEPLOYMENT_TARGET
cflags = $cflags_sdk $cflags_config -w
cxxflags = $cflags_sdk $cflags_config -stdlib=libc++ -w
ldflags = $ldflags_sdk $ldflags_config
23 changes: 23 additions & 0 deletions editors/poedit/files/patch-deps-tool-path.diff
@@ -0,0 +1,23 @@
diff --git deps/build.vars.ninja deps/build.vars.ninja
index 36bf5820d..c2db79300 100644
--- deps/build.vars.ninja
+++ deps/build.vars.ninja
@@ -3,7 +3,7 @@ include build.vars.local.ninja

# Compiler etc. variables:
arch = x86_64
-sed = /usr/local/bin/gsed
+sed = @@PREFIX@@/bin/gsed
yacc = /usr/local/opt/bison/bin/yacc

ncpu = `sysctl -n hw.ncpu`
diff --git deps/build_deps.sh deps/build_deps.sh
index fcc216613..4b7f8b834 100755
--- deps/build_deps.sh
+++ deps/build_deps.sh
@@ -41,4 +41,4 @@ cflags_config = $cflags_config
ldflags_config = $ldflags_config
EOT

-ninja
+@@PREFIX@@/bin/ninja
96 changes: 96 additions & 0 deletions editors/poedit/files/patch-remove-sparkle.diff
@@ -0,0 +1,96 @@
diff --git Poedit.xcodeproj/project.pbxproj Poedit.xcodeproj/project.pbxproj
index e6487764f..9a777ef80 100644
--- Poedit.xcodeproj/project.pbxproj
+++ Poedit.xcodeproj/project.pbxproj
@@ -47,9 +47,7 @@
B24ACD8416F6263900399242 /* Poedit.iconset in Resources */ = {isa = PBXBuildFile; fileRef = B24ACD8316F6263900399242 /* Poedit.iconset */; };
B24D19691E84503B00C6DD8D /* poedit-status-warning.png in Resources */ = {isa = PBXBuildFile; fileRef = B24D19671E84503B00C6DD8D /* poedit-status-warning.png */; };
B24D196A1E84503B00C6DD8D /* poedit-status-warning@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B24D19681E84503B00C6DD8D /* poedit-status-warning@2x.png */; };
- B251159119DEC7E50053255C /* Sparkle.framework in Copy Private Frameworks */ = {isa = PBXBuildFile; fileRef = B256797417075E6000C52BC5 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
B25504A81A2201E800EE2CEE /* main_toolbar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25504A71A2201E800EE2CEE /* main_toolbar.cpp */; };
- B256797517075E6000C52BC5 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B256797417075E6000C52BC5 /* Sparkle.framework */; };
B2567977170763B700C52BC5 /* libwx_osx_cocoa_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B2567976170763B700C52BC5 /* libwx_osx_cocoa_static.a */; };
B25D94941AE3D7E3003BC368 /* concurrency.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25D94921AE3D7E3003BC368 /* concurrency.cpp */; };
B25DB35D1E3E5102006D7228 /* ExtractorsGNUgettext.png in Resources */ = {isa = PBXBuildFile; fileRef = B25DB35B1E3E5102006D7228 /* ExtractorsGNUgettext.png */; };
@@ -233,17 +231,6 @@
name = "Copy Quicklook plugin";
runOnlyForDeploymentPostprocessing = 0;
};
- B2E836D81709EB0700F31559 /* Copy Private Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- B251159119DEC7E50053255C /* Sparkle.framework in Copy Private Frameworks */,
- );
- name = "Copy Private Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
@@ -333,7 +320,6 @@
B24F15811AF38E4500B0022B /* sr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sr; path = sr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B25504A61A2201DC00EE2CEE /* main_toolbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = main_toolbar.h; sourceTree = "<group>"; };
B25504A71A2201E800EE2CEE /* main_toolbar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main_toolbar.cpp; path = wx/main_toolbar.cpp; sourceTree = "<group>"; };
- B256797417075E6000C52BC5 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
B2567976170763B700C52BC5 /* libwx_osx_cocoa_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libwx_osx_cocoa_static.a; sourceTree = BUILT_PRODUCTS_DIR; };
B25D94921AE3D7E3003BC368 /* concurrency.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; fileEncoding = 4; path = concurrency.cpp; sourceTree = "<group>"; };
B25D94931AE3D7E3003BC368 /* concurrency.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = concurrency.h; sourceTree = "<group>"; };
@@ -572,7 +558,6 @@
B2BF84BA170846290030AA22 /* OpenGL.framework in Frameworks */,
B2BF84C1170847E60030AA22 /* IOKit.framework in Frameworks */,
B2284A55183BE68200E097C7 /* Security.framework in Frameworks */,
- B256797517075E6000C52BC5 /* Sparkle.framework in Frameworks */,
B2BF84BE170847220030AA22 /* libz.dylib in Frameworks */,
B21FB781179D51BE003F45AC /* libexpat.dylib in Frameworks */,
B2D76A45181D027F0083C9D9 /* libLucenePlusPlus.a in Frameworks */,
@@ -824,7 +809,6 @@
B2D76A44181D027F0083C9D9 /* libLucenePlusPlus.a */,
B21FB780179D51BE003F45AC /* libexpat.dylib */,
B2BF84BD170847220030AA22 /* libz.dylib */,
- B256797417075E6000C52BC5 /* Sparkle.framework */,
B2567976170763B700C52BC5 /* libwx_osx_cocoa_static.a */,
B2B7E8191AD94194007FC4EB /* libwx_osx_base_static.a */,
B2BF84C21708498B0030AA22 /* HIToolbox.framework */,
@@ -1042,7 +1026,6 @@
B24ACD5816F6201F00399242 /* Frameworks */,
B24ACD5916F6201F00399242 /* Resources */,
B2CC62E117DB7E2D0097461B /* Set CFBundleVersion from git */,
- B2E836D81709EB0700F31559 /* Copy Private Frameworks */,
B23D1F72181446EF00E6B212 /* Copy Auxiliary Binaries */,
B2B7D470170DD91C00ED0AFE /* Copy Gettext bundle */,
B2CE6D2A1AD0096C007E6863 /* Copy Quicklook plugin */,
@@ -1763,7 +1746,7 @@
"-licudata",
"-licui18n",
);
- POEDIT_FEATURES = "USE_SPARKLE HAVE_CLD2 HAVE_HTTP_CLIENT";
+ POEDIT_FEATURES = "HAVE_CLD2 HAVE_HTTP_CLIENT";
PRODUCT_BUNDLE_IDENTIFIER = "net.poedit.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
@@ -1785,7 +1768,7 @@
"-licudata",
"-licui18n",
);
- POEDIT_FEATURES = "USE_SPARKLE HAVE_CLD2 HAVE_HTTP_CLIENT";
+ POEDIT_FEATURES = "HAVE_CLD2 HAVE_HTTP_CLIENT";
PRODUCT_BUNDLE_IDENTIFIER = "net.poedit.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
diff --git Poedit2.xcworkspace/contents.xcworkspacedata Poedit2.xcworkspace/contents.xcworkspacedata
index eba85bc59..92cf9bc42 100644
--- Poedit2.xcworkspace/contents.xcworkspacedata
+++ Poedit2.xcworkspace/contents.xcworkspacedata
@@ -19,9 +19,6 @@
<FileRef
location = "group:deps/boost/Boost.xcodeproj">
</FileRef>
- <FileRef
- location = "group:deps/sparkle/Sparkle.xcodeproj">
- </FileRef>
<FileRef
location = "group:deps/custom_build/cld2.xcodeproj">
</FileRef>

0 comments on commit 438bed1

Please sign in to comment.