diff options
author | Gitea | 2022-05-16 01:36:20 +0800 |
---|---|---|
committer | Gitea | 2022-05-16 01:36:20 +0800 |
commit | 67a2f8da0dee65c8bed82bdc86b8ae43765be57d (patch) | |
tree | f65d2983dd5abc15dcfcc8d716318241d4c10867 | |
parent | f21815d2d08b10c724ad999445923bbc68d9e8c4 (diff) | |
download | aur-67a2f8da0dee65c8bed82bdc86b8ae43765be57d.tar.gz |
2022-05-16
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | wxmedit-encdet-mozilla.patch | 63 |
2 files changed, 19 insertions, 58 deletions
@@ -1,7 +1,7 @@ # Maintainer: Yunhui Fu <yhfudev at gmail dot com> -pkgname=wxmedit-git -pkgver=r1282.a6d6fce +pkgname=wxmedit +pkgver=r1381.0ac05dc pkgrel=1 pkgdesc="Cross-platform Text/Hex Editor, a fork of MadEdit with bug fixes and improvements" arch=("i686" "x86_64") @@ -12,13 +12,13 @@ conflicts=('wxmedit') depends=('wxgtk' 'libucd-git' 'desktop-file-utils' 'boost') makedepends=('git' 'libucd-git' 'boost' 'wxgtk') source=( - "$pkgname::git://github.com/hltj/wxMEdit.git" - wxmedit-encdet-mozilla.patch + "${pkgname%-git}::git+https://github.com/hltj/wxMEdit.git" + wxmedit.patch ) install=wxmedit.install md5sums=( 'SKIP' - '357585e05be0a807e4416d31e76df17c' + '46a56ded3f5969d068701d9ee0ce11c1' ) pkgver_git() { @@ -35,7 +35,7 @@ pkgver() { prepare() { cd "$srcdir/$pkgname" #cd "$srcdir/wxMEdit-$pkgver" - patch -p1 < "$srcdir/wxmedit-encdet-mozilla.patch" + patch -p1 < "$srcdir/wxmedit.patch" } build() { @@ -43,7 +43,7 @@ build() { #cd "$srcdir/wxMEdit-$pkgver" ./autogen.sh - ./configure --prefix=/usr --with-wx-config=/usr/bin/wx-config-2.8 + ./configure --prefix=/usr --with-wx-config=/usr/bin/wx-config make -j $(cat /proc/cpuinfo | grep processor | wc -l | awk '{print $0 + 1;}') } diff --git a/wxmedit-encdet-mozilla.patch b/wxmedit-encdet-mozilla.patch index 52a119bc9025..5c42a5742268 100644 --- a/wxmedit-encdet-mozilla.patch +++ b/wxmedit-encdet-mozilla.patch @@ -1,51 +1,12 @@ -diff --git a/Makefile.am b/Makefile.am -index b660cc4..e8519c6 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -26,7 +26,7 @@ encdet_src = src/xm/encdet.cpp \ - bin_PROGRAMS = wxmedit - check_PROGRAMS = wxmedit_test - TESTS = wxmedit_test --wxmedit_LDADD = ${curl_LIBS} -+wxmedit_LDADD = ${curl_LIBS} -lucd - wxmedit_CXXFLAGS = -DDATA_DIR=\"${datadir}\" ${curl_CFLAGS} - wxmedit_SOURCES = $(enc_src) \ - $(encdet_src) \ -diff --git a/src/xm/encdet.cpp b/src/xm/encdet.cpp -index 8200fdc..4270e93 100644 ---- a/src/xm/encdet.cpp -+++ b/src/xm/encdet.cpp -@@ -558,8 +558,13 @@ private: - };
- #endif
-
-+#if 1
-+#include <libucd.h>
-+#endif
-+
- void DetectEncoding(const ubyte* text, size_t len, EncodingID& enc, bool skip_utf8)
- {
-+#if 0
- UErrorCode status = U_ZERO_ERROR;
- LocalUCharsetDetectorPointer csd(ucsdet_open(&status));
- ucsdet_setText(csd.getAlias(), (const char*)text, len, &status);
-@@ -611,6 +616,19 @@ void DetectEncoding(const ubyte* text, size_t len, EncodingID& enc, bool skip_ut - if(det != ENC_DEFAULT)
- enc = det;
- }
-+#else
-+ ucd_t det;
-+ char buffer[UCD_MAX_ENCODING_NAME + 1] = "GB18030";
-+ if (ucd_init (&det) >= 0) {
-+ ucd_parse (&det, (const char*)text, len);
-+ ucd_end (&det);
-+ if (ucd_results (&det, buffer, sizeof(buffer) - 1) < 0) {
-+ buffer[0] = 0;
-+ }
-+ ucd_clear(&det);
-+ }
-+ std::string enc_name(buffer);
-+#endif
- }
-
- } // namespace xm
+diff -uprN wxmedit-git.git/src/wxmedit/src/xm/encoding/multibyte.cpp wxmedit-git/src/wxmedit/src/xm/encoding/multibyte.cpp +--- a/src/xm/encoding/multibyte.cpp 2022-05-15 23:58:39.274350279 +0800 ++++ b/src/xm/encoding/multibyte.cpp 2022-05-15 22:48:47.800707488 +0800 +@@ -33,7 +33,7 @@ ICUConverter::ICUConverter(const std::st + + m_ucnv = ucnv_open(encname.c_str(), &err); + +- ucnv_setFallback(m_ucnv, FALSE); ++ ucnv_setFallback(m_ucnv, false); + ucnv_setFromUCallBack(m_ucnv, error_callback, nullptr, nullptr, nullptr, &err); + } + |