Bug 26190 - new port request: libelf
Summary: new port request: libelf
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Peter Pentchev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-29 02:40 UTC by vanmaren
Modified: 2001-04-18 18:36 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vanmaren 2001-03-29 02:40:00 UTC
libelf is a library for manipulating ELF object files and is available on SVR4 machines and as a RPM for RedHat Linux.  A "free" version (as opposed to the "real" SVR4 one) is available at http://www.stud.uni-hannover.de/~michael/software/, the latest version being 0.7.0.

Fix: Create a FreeBSD port (probably devel/libelf) using the following information:

1. fetch http://www.stud.uni-hannover.de/~michael/software/libelf-0.7.0.tar.gz
2. (maybe) read the included README, also available at http://www.stud.uni-hannover.de/~michael/software/libelf-0.7.0.README
3. apply the following patch (to get it to not think FreeBSD's elf.h is the same as the SVR4/Linux elf.h, since it expects it to have certain #defines if it exists):

=== start of patch ===


fi

-for ac_hdr in unistd.h elf.h sys/elf.h
+# for ac_hdr in unistd.h elf.h sys/elf.h
+for ac_hdr in unistd.h sys/elf.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
=== end of patch ===
4. cd libelf-0.7.0
5. ./configure
6. make
7. make install (as root), which installs header files in /usr/local/include/libelf and libelf.a in /usr/local/lib

You may want to enable the shared-library version and/or disable the NLS support (there are no message files) as described in the README.

The README also lists mirror sites for the software:
    ftp://sunsite.unc.edu/pub/Linux/libs/
    ftp://ftp.stud.uni-hannover.de/pub/users/michael/
    http://www.stud.uni-hannover.de/~michael/software/--hHNuCBxslozLG4Gelk42BY89fMQ3IA1ts8oac0LP38NDothr
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- libelf-0.7.0/configure.orig Wed Mar 28 19:04:42 2001
+++ libelf-0.7.0/configure      Wed Mar 28 19:04:56 2001
@@ -1038,7 +1038,8 @@
How-To-Repeat: Try to compile something on FreeBSD that requires libelf, commonly used in SVR4, and isn't currently available in the FreeBSD ports collection.
Comment 1 Peter Pentchev freebsd_committer freebsd_triage 2001-04-17 14:50:59 UTC
State Changed
From-To: open->analyzed

I'll try to make a port out of this. 


Comment 2 Peter Pentchev freebsd_committer freebsd_triage 2001-04-17 14:50:59 UTC
Responsible Changed
From-To: freebsd-ports->roam

Let me take a shot at this :)
Comment 3 Peter Pentchev freebsd_committer freebsd_triage 2001-04-18 18:36:29 UTC
State Changed
From-To: analyzed->closed

Added as devel/libelf, thanks for the pointer!