f508 [Solved] Editing the the sources of a port before installation - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Ports & Packages > Installation and Maintenance of FreeBSD Ports or Packages

Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Reply
 
Thread Tools Display Modes
  #1  
Old February 1st, 2012, 22:49
Michael-Sanders Michael-Sanders is offline
Junior Member
 
Join Date: Feb 2012
Posts: 38
Thanks: 13
Thanked 7 Times in 6 Posts
Default Editing the the sources of a port before installation

Question: What is the preferred method of modifying the sources of a given third party package before its installed? Allow me to clarify.

After installing Midnight Commander: sudo pkg_add -r mc

I found the package suffered from an ftp issue I sought to fix. I next removed mc, installed its port sources and after some wrestling with make patched the sources and installed the modified version successfully.

(Please bear with me here, I'm new to FreeBSD and am attempting to describe the problem using proper nomenclature).

If one needs to edit the sources of a port, yet one can only invoke make (that I'm currently aware of) to start the build process, how is it possible to first edit, then build a port's sources?

If my case to solve this, I invoked make followed by CTRL-C to disrupt the build process, edited the necessary file, then ran make again. But I'm thinking I've approached things the hard way when a better, more streamlined solution likely exists.

Last edited by DutchDaemon; February 1st, 2012 at 22:56. Reason: Formatting & Style: http://forums.freebsd.org/showthread.php?t=8816 / http://forums.freebsd.org/showthread.php?t=18043
Reply With Quote
  #2  
Old February 1st, 2012, 22:57
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,819
Thanks: 30
Thanked 1,883 Times in 1,329 Posts
Default

See the TARGETS in ports(7). There's much more you can do with make other than starting the build.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Adminstrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Reply With Quote
The Following User Says Thank You to DutchDaemon For This Useful Post:
Michael-Sanders (February 1st, 2012)
  #3  
Old February 1st, 2012, 23:08
Michael-Sanders Michael-Sanders is offline
Junior Member
 
Join Date: Feb 2012
Posts: 38
Thanks: 13
Thanked 7 Times in 6 Posts
Default

Yes, I see now under section TARGETS of ports(7): fetch & extract apply (thank you DutchDaemon).

I'll study this now.
Reply With Quote
  #4  
Old February 1st, 2012, 23:08
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,141
Thanks: 43
Thanked 701 Times in 579 Posts
Default

Have a gander through the Porter's Handbook, as well. Especially the section on Patching Sources.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
The Following User Says Thank You to phoenix For This Useful Post:
Michael-Sanders (February 1st, 2012)
  #5  
Old February 2nd, 2012, 08:50
SirDice's Avatar
SirDice SirDice is offline
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,694
Thanks: 47
Thanked 2,021 Times in 1,860 Posts
Default

You basically want to do these:
Code:
make fetch     # fetches the distfile
make extract   # extracts the distfile into the work directory
make patch     # applies any specific FreeBSD patches
make configure # runs ./configure
After that you could edit the sources in the work directory. Once finished you can continue with the install.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
The Following 2 Users Say Thank You to SirDice For This Useful Post:
drhowarddrfine (February 2nd, 2012), Michael-Sanders (February 2nd, 2012)
  #6  
Old February 2nd, 2012, 15:58
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,701
Thanks: 429
Thanked 1,757 Times in 1,456 Posts
Default

But because this is make[(1), earlier steps are done automatically. In other words, make patch is equivalent to make fetch extract patch.
Reply With Quote
Reply

Tags
modify, ports

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
installation through port question alfchung Installation and Maintenance of FreeBSD Ports or Packages 3 June 30th, 2011 17:13
How to abort a frozen port installation itslikethat Installation and Maintenance of FreeBSD Ports or Packages 1 January 21st, 2011 04:33
[Solved] Port installation progress. DreamWave Installation and Maintenance of FreeBSD Ports or Packages 3 March 20th, 2010 14:17
Port installation failing trybeingarun Installation and Maintenance of FreeBSD Ports or Packages 4 February 21st, 2010 03:30
Editing with vi misfitxnet General 5 March 9th, 2009 05:10


All times are GMT +1. The time now is 03:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0