Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#38240 closed request (fixed)

Port request: Tiled

Reported by: cooljeanius (Eric Gallager) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: tiled

Description

Tiled is an open-source, Qt-based map editor for 2D video games, using the custom .tmx map format. Links:

Homepage: http://www.mapeditor.org

SourceForge: http://sourceforge.net/projects/tiled/

GitHub: https://github.com/bjorn/tiled

I had started writing a portfile for it myself, but I gave up on it because I find the Qt portgroup too difficult. I suppose I can paste what I have so far though:

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$

PortSystem            1.0
PortGroup             qt4 1.0

name                  tiled
version               0.9.0
revision              0
categories            devel games aqua
platforms             darwin
license               {BSD GPL-2 LGPLv2}
maintainers           nomaintainer

description           ${name} is a general purpose tile map editor, built to be flexible and easy to use.
long_description \
    ${description} In addition to its own map format, Tiled supports read/write plugins for using it with \
    proprietary map formats or formats used by other editors.

homepage              http://www.mapeditor.org
# sourceforge project name is different from port name, so not using sourceforge fetch group
master_sites          http://sourceforge.net/projects/tiled/files/tiled-qt/${version}/
# Have to specify the .tar.gz dist because otherwise it might grab the .dmg binary 
# (note: haven't actually tested this; just speculating)
distname              ${name}-qt-${version}.tar.gz

checksums             md5     e2e21a54ff17e34b49b8a330cc8b657e \
                      sha1    389c846bf81adf411cb004329028924432b4b2cd \
                      rmd160  3faf36f22187b82943640bfb833d14c617487c01 \
                      sha256  ffc8831be72eede7a2fca64909560124452370457214d811d6c7030e057a1a33

(I didn't make this an attachment because it's incomplete and I don't want anyone to try using it as an actual portfile as is)

Attachments (1)

Portfile (1.7 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
improved still not working portfile

Download all attachments as: .zip

Change History (9)

comment:1 in reply to:  description ; Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to egall@…:

license               {BSD GPL-2 LGPLv2}

The separator between license name and version should be "-" not "v".

# sourceforge project name is different from port name, so not using sourceforge fetch group
master_sites          http://sourceforge.net/projects/tiled/files/tiled-qt/${version}/

It looks the same. If it isn't, you use "sourceforce:projectname". Better yet, use the complete path within SourceForge as explained in wiki:howto/AvoidRedirects.

# Have to specify the .tar.gz dist because otherwise it might grab the .dmg binary 
# (note: haven't actually tested this; just speculating)
distname              ${name}-qt-${version}.tar.gz

distname must be without suffix. To construct distfiles, extract.suffix is appended to each distname. There isn't any ambiguity about what MacPorts will do; it's quite straightforward.

(I didn't make this an attachment because it's incomplete and I don't want anyone to try using it as an actual portfile as is)

If you could let us know what problems you encountered that might help us finish the port.

comment:2 in reply to:  1 Changed 12 years ago by cooljeanius (Eric Gallager)

Replying to ryandesign@…:

Replying to egall@…:

(I didn't make this an attachment because it's incomplete and I don't want anyone to try using it as an actual portfile as is)

If you could let us know what problems you encountered that might help us finish the port.

Well I was using the portfile I wrote for Valkyrie in #38090 as a template, and for that I had to use all sorts of dirty hacks just to get qmake to behave, so I didn't really want to go through all that again here...

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Ah yes, this software configures using qmake. Yes unfortunately qmake seems to suck quite badly, or at least make it very difficult to be told how to use the archs and compilers we want it to, hence lots of jumping through hoops. Maybe a portgroup could alleviate some of the tedium. Someone who understands something about qmake would have to lead that effort.

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: Portfile added

improved still not working portfile

comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

I attached a slightly improved portfile. It builds and installs. It doesn't run. Several outstanding problems are pointed out in the comments.

comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed

Fixed and committed in r103590. (I just had to rip out all their Mac-specific packaging ideas which didn't seem ideal within the context of MacPorts.)

comment:6 Changed 12 years ago by cooljeanius (Eric Gallager)

Wow, that's a lot of patches! Thanks for all your work so far on getting this port added!

comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Yes but they're all patching the same thing.

The developers were trying to be clever and put the libtiled library inside the tiled application bundle. This is desirable for standalone drag-and-drop installs, but that's not what MacPorts is, and users who want that can use the dylibbundler program. And it didn't quite make sense either, since they actually install three applications, but only the main tiled application contained the library; the other two apps were trying to use the library inside the main one. I think one of the settings in the cmake portgroup was interacting badly with the way they were setting the install_name. And also the install process was managing to install two copies of the library: one in the application bundle, and one in ${prefix}/lib. I decided to just stick with the one in ${prefix}/lib.

comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)

Now that there's a qmake portgroup as of r106912, this port can now use it

Edit: doing that is #39424

Last edited 11 years ago by cooljeanius (Eric Gallager) (previous) (diff)
Note: See TracTickets for help on using tickets.