# Handbrake - old problem



## talsamon (Jun 9, 2015)

```
===>  handbrake-0.10.1_3 conflicts with installed package(s):
  x265-1.6

  They will not build together.
  Please remove them first with pkg delete.
*** Error code 1
```

Can't deinstall multimedia/x265 will deinstall too many other ports.


----------



## protocelt (Jun 9, 2015)

If you don't have a need for H.265 video codec support, remove the make option from the multimedia/ffmpeg port(which is off by default) and rebuild it and all dependencies with `portmaster -r ffmpeg-(n)` where n = port version(get version information from `pkg info ffmpeg`), then rebuild multimedia/handbrake.

Edit: Oops! Forgot to mention deleting multimedia/x265 with `pkg delete -f x265` before rebuilding multimedia/ffmpeg


----------



## talsamon (Jun 9, 2015)

Ok, first I made the "error" to try to deinstall with `pkg delete`. Worked if I deinstall it direct in the multimedia/x265 port and reinstalled it after multimedia/handbrake update. But such things are annoying.


----------



## protocelt (Jun 9, 2015)

talsamon said:


> Ok, first I made the "error" to try to deinstall with `pkg delete`. Worked if I deinstall it direct in the multimedia/x265 port and reinstalled it after multimedia/handbrake update. But such things are annoying.


True, maybe a problem report against multimedia/handbrake is needed here. You and more people will undoubtedly run into this every time you update multimedia/handbrake.


----------



## talsamon (Jun 9, 2015)

Thanks, protocelt. But I made this *Bug 199126* PR - It was another problem. But if you read it, the original problem was solved, but not the problem with "installed in the same place". It would not solved. I had no hope this will corrected if I make a new  or reopen the old one, cause this port is unmaintened.


----------



## protocelt (Jun 9, 2015)

Since the port is unmaintained I suppose you'll just have to deal with that unless you or someone else is kind enough to create and submit a patch against the port to work around this. Something similar was done I think for Nvidia's GL libraries in the x11/nvidia-driver port.


----------



## talsamon (Jun 9, 2015)

I will have a closer look on this. But I need too long  to make a patch.


----------



## talsamon (Jun 9, 2015)

Did a simple trick. Put in the Makefile 

```
cd ../x265 && make deinstall clean && cd -
```
and nearly the end

```
cd ../x265 && make install clean && cd -
```

This would work, but I find no way to patch the port Makefile. I had a patch-file but it stops in the line 
	
	



```
CONFLICTS_BUILD=  x265
```
. The patch does not work. It never find out how to patch a port Makefile - it a path problem I think, but I don't know. (It seems you can patch every file in the port directory, except the Makefile ??)


----------



## kpa (Jun 9, 2015)

Patches in the files subdirectory are not meant for patching the port files. They are only for patching the extracted source code in the work directory.


----------



## talsamon (Jun 9, 2015)

hmm, thats no a good idea I see, next change in the Makefile will not work.


----------



## talsamon (Jun 9, 2015)

I have make a bsd.handbrake.mk. Included this with /etc/make.conf and unset `CONFLICTS_BUILD` for this port. I know this is not the right way. But it's simplier as to change much things in the source code.


----------



## talsamon (Jun 10, 2015)

After some problems with portmaster, works fine, solved.


----------



## protocelt (Jun 10, 2015)

It might have compiled and installed fine, but did you test multimedia/handbrake using the H.265 video codec after getting it installed that way?


----------



## talsamon (Jun 10, 2015)

You were right. `pkg delete` showed me fifteen or twenty ports if deinstall multimedia/x265. In the end I deinstalled it, and had only to change the options in multimedia/ffmpeg und multimedia/vlc. (But the idea with  bsd.handbrake.mk I can use for other problems) . Thanks.


----------

