You are not logged in.

#1 2022-05-15 15:40:42

t20
Member
Registered: 2021-12-21
Posts: 5

PKGBUILD patch request : wxmedit-git

PKGBUILD

# Maintainer: Yunhui Fu <yhfudev at gmail dot com>

pkgname=wxmedit-git
pkgver=r1381.0ac05dc
pkgrel=1
pkgdesc="Cross-platform Text/Hex Editor, a fork of MadEdit with bug fixes and improvements"
arch=("i686" "x86_64")
url="https://wxmedit.github.io/"
license=('GPL')
conflicts=('wxmedit')
#depends=('wxgtk' 'libucd-git' 'icu' 'desktop-file-utils' 'boost')
depends=('wxgtk' 'libucd-git' 'desktop-file-utils' 'boost')
makedepends=('git' 'libucd-git' 'boost' 'wxgtk')
source=(
    "${pkgname%}::git+https://github.com/hltj/wxMEdit.git"
    wxmedit-encdet-mozilla.patch
    )
install=wxmedit.install
md5sums=(
    'SKIP'
    'SKIP'
    )

pkgver_git() {
    cd "${srcdir}/${pkgname}"
    #local ver="$(git show | grep commit | awk '{print $2}' )"
    #printf "r%s" "${ver//[[:alpha:]]}"
    echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

pkgver() {
  pkgver_git
}

prepare() {
  cd "$srcdir/$pkgname"
  #cd "$srcdir/wxMEdit-$pkgver"
  patch -p1 < "$srcdir/wxmedit-encdet-mozilla.patch"
}

build() {
  cd "$srcdir/$pkgname"
  #cd "$srcdir/wxMEdit-$pkgver"

  ./autogen.sh
  ./configure --prefix=/usr --with-wx-config=/usr/bin/wx-config
  make -j $(cat /proc/cpuinfo | grep processor | wc -l | awk '{print $0 + 1;}')
}

package() {
  cd "$srcdir/$pkgname"
  #cd "$srcdir/wxMEdit-$pkgver"
  make DESTDIR="${pkgdir}" install
}

wxmedit-encdet-mozilla.patch

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);
 }
 

Last edited by t20 (2022-05-15 18:55:18)

Offline

#2 2022-05-15 18:54:10

t20
Member
Registered: 2021-12-21
Posts: 5

Re: PKGBUILD patch request : wxmedit-git

Submitted after study. works fine

Offline

#3 2022-05-16 10:00:05

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,140

Re: PKGBUILD patch request : wxmedit-git

many packages using boost have a makedepend on boost, but only need boost-libs at runtime.

install=wxmedit.install

Shouldn't that be called wxmedit-git.install ?
Also .install files are rarely needed nowadays, what is in it ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB