Package Details: townsemu-git 3304.5959e45-1

Git Clone URL: https://aur.archlinux.org/townsemu-git.git (read-only, click to copy)
Package Base: townsemu-git
Description: An emulator of legendary Fujitsu FM TOWNS computer
Upstream URL: https://github.com/captainys/TOWNSEMU
Licenses: GPL
Conflicts: townsemu
Provides: townsemu
Submitter: heavysink
Maintainer: heavysink (lilac)
Last Packager: lilac
Votes: 1
Popularity: 0.000000
First Submitted: 2020-09-09 13:59 (UTC)
Last Updated: 2025-06-07 17:20 (UTC)

Dependencies (6)

Required by (0)

Sources (1)

Latest Comments

rubin55 commented on 2025-06-18 08:48 (UTC)

gcc13 and gcc13-libs was removed from core, so I needed to mangle the build a bit. I first tried regular build with current default gcc (version), but ran into incompatible pointer type errors, which could be circumvented by passing -Wno-error=incompatible-pointer-types, but due to a bug in src/gui/CmakeLists.txt this breaks the resulting make.flags.

If you're impatient, you can patch that CmakeLists.txt yourself with this fix-cmakelists-quoting.patch:

diff --git a/gui/src/CMakeLists.txt b/gui/src/CMakeLists.txt
index 7dbc7e16..5d925816 100644
--- a/gui/src/CMakeLists.txt
+++ b/gui/src/CMakeLists.txt
@@ -8,8 +8,8 @@ set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)

 if(UNIX)
-   set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} -Wno-unused-variable)
-   set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wno-unused-variable)
+   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable")
 endif()

 set(DISC_IMAGE_DIR "C:/D/TownsISO")

I've also heavily cleaned up the PKGBUILD, removing commented-out seds, removing single-thread building, and making use of this fix by passing along CMAKE_C_FLAGS and CMAKE_CXX_FLAGS to speficy -Wno-error=incompatible-pointer-types. Here's the complete PKGBUILD (patch file and command could be removed after upstream accepts previously linked PR):

# Maintainer: heavysink <winstonwu91@gmail.com>

pkgname=townsemu-git
pkgver=3304.5959e453
pkgrel=2
pkgdesc="An emulator of legendary Fujitsu FM TOWNS computer"
arch=('i686' 'x86_64')
url="https://github.com/captainys/TOWNSEMU"
license=('GPL')
depends=('alsa-lib' 'glu')
makedepends=('git' 'cmake')
provides=('townsemu')
conflicts=('townsemu')
source=(
  "git+https://github.com/captainys/TOWNSEMU"
  "fix-cmakelists-quoting.patch"
)
options=('!buildflags')
md5sums=('SKIP' 'SKIP')

pkgver() {
  cd TOWNSEMU
  printf "%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
  cd TOWNSEMU
  mkdir -p build build_gui
  cat "${srcdir}/fix-cmakelists-quoting.patch" | patch -p1
  cd gui/src
  git clone https://github.com/captainys/public.git
}

build() {
  cd TOWNSEMU/build
  cmake ../src -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5
  cmake --build . --config Release
  cd ../build_gui
  cmake ../gui/src -DCMAKE_C_FLAGS='-Wno-error=incompatible-pointer-types' -DCMAKE_CXX_FLAGS='-Wno-error=incompatible-pointer-types' -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_POLICY_VERSION_MINIMUM=3.5
  cmake --build main_gui --config Release
}

package() {
  cd TOWNSEMU/build

  install -m 755 -d "${pkgdir}/usr/bin"
  install -m 755 ./main_cui/Tsugaru_CUI ${pkgdir}/usr/bin/Tsugaru_CUI

  cd ../../TOWNSEMU/build_gui
  install -m 755 ./main_gui/Tsugaru_GUI ${pkgdir}/usr/bin/Tsugaru_GUI
}

rubin55 commented on 2025-02-15 10:00 (UTC)

This package seems to be broken due to some issue with cmake upstream. I filed: https://github.com/captainys/TOWNSEMU/issues/145

The error(s):

/bin/sh: line 1: -Wno-unused-variable: command not found
/bin/sh: line 1: -Wno-unused-variable: command not found
clang++/bin/sh: line 1: -Wno-unused-variable: command not found

rubin55 commented on 2024-08-01 12:44 (UTC)

I noticed I can't compile anymore since upgrading to GCC 14.x. As a workaround, you can compile with (latest, v19.x at this moment) clang, by exporting CC and CXX in the PKGBUILD. Juist add the following two lines to the build() function, at the beginning:

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

klore commented on 2021-01-26 04:40 (UTC)

Now I can compile

klore commented on 2021-01-10 08:42 (UTC)

/usr/bin/ld: yssimplesound.cpp:(.text+0x10f8): undefined reference to `YsSoundPlayer::SoundData::CleanUpAPISpecific()' collect2: error: ld returned 1 exit status make[2]: [tests/CMakeFiles/disasm_addr.dir/build.make:162: tests/disasm_addr] Error 1 make[1]: [CMakeFiles/Makefile2:2560: tests/CMakeFiles/disasm_addr.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 98%] Linking CXX static library libfssimplewindow_connection.a [ 98%] Built target fssimplewindow_connection [ 99%] Linking CXX static library libtownsargv.a [ 99%] Built target townsargv [ 99%] Linking CXX static library libtownscommand.a [ 99%] Built target townscommand make: [Makefile:114: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...