Package Details: xbill 2.1-11

Git Clone URL: https://aur.archlinux.org/xbill.git (read-only, click to copy)
Package Base: xbill
Description: A game that tests your reflexes as you seek and destroy all forms of Bill
Upstream URL: http://www.xbill.org/
Licenses: GPL
Submitter: arojas
Maintainer: bidulock
Last Packager: bidulock
Votes: 6
Popularity: 0.005953
First Submitted: 2019-04-03 06:42 (UTC)
Last Updated: 2019-04-10 07:45 (UTC)

Dependencies (3)

Required by (0)

Sources (1)

Latest Comments

Erwin_Iosef commented on 2025-04-01 11:02 (UTC) (edited on 2025-04-01 11:04 (UTC) by Erwin_Iosef)

Here's my modified PKGBUILD using Debian's patch for the implicit function declaration and my own fix for the ./configure error(line 20) @micwoj92 @bidulock

PKGBUILD

# Maintainer: Brian Bidulock <bidulock@openss7.org>
# Contributor: Eric Bélanger <eric@archlinux.org>

pkgname=xbill
pkgver=2.1
pkgrel=11
pkgdesc="A game that tests your reflexes as you seek and destroy all forms of Bill"
arch=('x86_64' 'i686')
url="http://www.xbill.org/"
license=('GPL')
depends=('xaw3d' 'libxpm')
makedepends=('libxaw')
install=xbill.install
source=(http://www.xbill.org/download/${pkgname}-${pkgver}.tar.gz 04_implicit_declaration.diff)
sha512sums=('127604d88258db0ec47084209c656f8817146d70b0fe16f5a1d79883415cf38200594834b39080d78c627104ae6d204f3c12caf127fa094108c4edfbfa98d966' 'SKIP')

prepare()
{
    sed -i '700s/main()/int main()/' ${pkgname}-${pkgver}/configure > /dev/null 2>&1
    patch -d ${pkgname}-${pkgver} -Np1 < 04_implicit_declaration.diff
}

build() {
  cd ${pkgname}-${pkgver}
  LIBS='-lXpm' ./configure --prefix=/usr --mandir=/usr/share/man --localstatedir=/var/games \
    --disable-motif  --enable-athena --disable-gtk
  make
}

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

# set appropriate permissions and destinations
  chown root:games "${pkgdir}/usr/bin/xbill"
  chmod 2755 "${pkgdir}/usr/bin/xbill"

  chown root:games "${pkgdir}/var/games"
  chmod 775 "${pkgdir}/var/games"
  chown root:games "${pkgdir}/var/games/xbill"
  chmod 775 "${pkgdir}/var/games/xbill"

# Handle the scores file creation in the install script
  rm "${pkgdir}/var/games/xbill/scores"
}
04_implicit_declaration.diff

Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Include missing headers to fix implicit-declaration warning
 - str(n)casecmp is defined in <strings.h>
 - as a strings.h also exists in the source directory and the source directory
   is added to the search path, the system-wide strings.h was not found
   -> drop the source directory from source path
 - make sure util.h can be included by looking in the source directory
Bug-Debian: https://bugs.debian.org/1066574

--- a/Bucket.c
+++ b/Bucket.c
@@ -1,4 +1,4 @@
-#include <util.h>
+#include "util.h"

 #include "Bucket.h"
 #include "Cable.h"
--- a/Game.c
+++ b/Game.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <strings.h>
 #include <string.h>
 #include <time.h>

--- a/Makefile.in
+++ b/Makefile.in
@@ -20,7 +20,7 @@
 srcdir = @srcdir@
 VPATH = @srcdir@

-ALL_CFLAGS =   $(CFLAGS) $(CPPFLAGS) -I$(srcdir)
+ALL_CFLAGS =   $(CFLAGS) $(CPPFLAGS)
 ALL_LDFLAGS =  $(CFLAGS) $(LDFLAGS)
 IMAGE_DEFINES=-DIMAGES=\"${datadir}/xbill\"
 SCORE_DEFINES=-DSCOREFILE=\"${localstatedir}/xbill.scores\"
--- a/UI.c
+++ b/UI.c
@@ -1,6 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>

 #include "strings.h"
 #include "types.h"

Taken from https://salsa.debian.org/games-team/xbill

A better alternative would be to build directly using debian's source but that presented some problems and right now we only need this fix.

micwoj92 commented on 2024-08-22 21:29 (UTC)

Build fails

==> Starting build()...
creating cache ./config.cache
checking for bison... bison -y
checking for gcc... gcc
checking whether the C compiler (gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/xbill/src=/usr/src/debug/xbill -flto=auto -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
==> ERROR: A failure occurred in build().
    Aborting...