huzheng001 / stardict-3

Automatically exported from code.google.com/p/stardict-3
GNU General Public License v3.0
309 stars 66 forks source link

build 3.0.6.2 error #92

Closed 20NE closed 3 years ago

20NE commented 3 years ago

output:

make[4]: Entering directory '/home/xxx/stardict/repos/community-x86_64/src/stardict-3.0.6.2/dict/src/sounds'
make[4]: *** No rule to make target 'menushow.wav', needed by 'all-am'.  Stop.
make[4]: Leaving directory '/home/xxx/stardict/repos/community-x86_64/src/stardict-3.0.6.2/dict/src/sounds'
make[3]: *** [Makefile:830: all-recursive] Error 1
make[3]: Leaving directory '/home/xxx/stardict/repos/community-x86_64/src/stardict-3.0.6.2/dict/src'
make[2]: *** [Makefile:512: all-recursive] Error 1
make[2]: Leaving directory '/home/xxx/stardict/repos/community-x86_64/src/stardict-3.0.6.2/dict'
make[1]: *** [Makefile:440: all] Error 2
make[1]: Leaving directory '/home/xxx/stardict/repos/community-x86_64/src/stardict-3.0.6.2/dict'
make: *** [Makefile:326: all-recursive] Error 1

makefile:

pkgver=3.0.6.2
pkgrel=1
pkgdesc='International dictionary software'
arch=('x86_64')
url='http://stardict-4.sourceforge.net/'
license=('GPL')
depends=('gtk2' 'libsigc++')
makedepends=('enchant' 'espeak' 'mariadb-libs' 'gnome-common')
optdepends=('enchant: spell checker plugin'
            'espeak: text to speech plugin')
options=('!emptydirs')
source=("https://download.sourceforge.net/project/stardict-4/$pkgver/$pkgname-$pkgver.tar.xz"
        'gcc46.patch'
        'glib2.patch'
        'mariadb.patch')
sha256sums=('d1f6419a0daf6541eb120d514bc202dc7026efb0b9d497ad2e9651a58c6267d1'
            '207dc727b69ee8552372d5551f54a638b472703aeb13a64cdfee6bad00dc380d'
            '5be4d0468f6089b760924a5d25030110ca62869b4611afb46a411cd4eb59b832'
            'f66b916c358bddf48fcb91a7d0190a7109fe92a1388ec982c47dfa9ac1ee69cf')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  patch -p1 -i ../gcc46.patch
  patch -p1 -i ../glib2.patch
  patch -p1 -i ../mariadb.patch

  sed -i 's/, enchant/, enchant-2/' dict/configure.ac
  sed -i '/AM_GCONF_SOURCE_2/d' dict/configure.ac
  sed -i '/GNOME_DOC_INIT/d' dict/configure.ac
  sed -i '/gnome-doc-utils.make/d' dict/help/Makefile.am

  ./autogen.sh
}

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

  CXXFLAGS+=" -std=gnu++11"
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --mandir=/usr/share/man \
    --disable-gnome-support \
    --disable-gucharmap \
    --disable-flite \
    --disable-festival \
    --disable-updateinfo 
  sed -e 's/ -shared / -Wl,-O1,--as-needed\0/g' -i {dict,lib,tools}/libtool
  make
}

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