Opened 11 years ago

Closed 11 years ago

#40324 closed submission (fixed)

fatsort: new port

Reported by: Ionic (Mihai Moldovan) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: fatsort

Description

Fatsort is a utility to sort files on FAT12/16/32 file systems, useful for MP3 players and other devices playing files as they show up in the file association table.

Submitting a portfile for that. :)

Note that this project is not using autotools.

Attachments (2)

patch-src-Makefile.diff (296 bytes) - added by Ionic (Mihai Moldovan) 11 years ago.
Patch the makefile to not override CFLAGS/LDFLAGS via make call.
Portfile (1.8 KB) - added by Ionic (Mihai Moldovan) 11 years ago.
Get rid of the ugly muniversal hack for building universal with FSF GCC, instead focus on Apple (LLVM) GCC and clang which can build universal OOTB via -arch.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by Ionic (Mihai Moldovan)

Attachment: patch-src-Makefile.diff added

Patch the makefile to not override CFLAGS/LDFLAGS via make call.

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks. Some observations:

  • Because it's not using an autotools-compatible configure script, you're responsible for manually adding a universal variant and using the right -arch flags. The [get_canonical_archflags] procedure can help you.
  • You don't need to add -L${prefix}/lib to ldflags; that's the default.
  • You usually don't need to add -I${prefix}/include to cflags because that really belongs in cppflags and is there by default.
  • Those reinplaces should be in post-patch not pre-build.

comment:2 Changed 11 years ago by Ionic (Mihai Moldovan)

LDFLAGS/C(PP)FLAGS and reinplace-hook position changed as per your request.

About the universal comment... yes, you're right. I should at least set the arch flags. I've seen something like this in other Portfiles, so that'll be quick.

Is universal building a requirement? I'll get to that tomorrow/after sleeping.

comment:3 Changed 11 years ago by Ionic (Mihai Moldovan)

What about this... it is hacky, but as muniversal is relying on the configure stage to set up CFLAGS/LDFLAGS and is not touching those variables at build time, I haven't seen any other workaround (but basically copying those whole muniversal PortGroup file into the portfile and adjusting that... which I really, really didn't want to do.)

Changed 11 years ago by Ionic (Mihai Moldovan)

Attachment: Portfile added

Get rid of the ugly muniversal hack for building universal with FSF GCC, instead focus on Apple (LLVM) GCC and clang which can build universal OOTB via -arch.

comment:4 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… removed
Owner: changed from macports-tickets@… to larryv@…
Status: newassigned

I’ll commit this sometime this week.

comment:5 Changed 11 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: assignedclosed

Committed in r110844:110846, with a few changes:

  • Specified FreeBSD and Linux in “platforms”, since upstream claims to support them.
  • Specified license as “GPL-2+”.
  • Added a SHA256 checksum.
  • Specified CFLAGS and LDFLAGS via the build environment instead of patching the makefile. (Requires GNU Make.)
  • Specified MANDIR and SBINDIR as destroot arguments instead of reinplace-ing.
  • Enabled test phase, although it’ll just fail out on OS X.

Thanks.

Note: See TracTickets for help on using tickets.